Chat color plugin

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

TurtleGamerz

Member
Jun 4, 2017
2
0
0
23
Hy people, I'm making a chatcolor plugin in skript for my Minecraft server. But i need to know how i can add the prefix of the player in my server to the skript: For example the prefix is (its a kingdom server):

[Erylis][King][helper] theking12014

[Erylis] = Kingdom, [king] = kingdom rank, [Helper] = staff rank, theking12014 = player name

How do i add this infront of the chat color. The chat format i already have is:

messageformat: %player%%{color.%player%}%%message%

Can someone help me please?
Greetings TurtleGamerz
 
Does the plugin has some chat support? Does it sets the player's prefix to its kingdom?
You can use the expression message format, from SkQuery. If you doesn't have any chat plugin, you can use it in on chat event, and it will return something like <%1$s> %2$s, where the %1$s is the player display name and %2$s is the message.
If the plugin has support for chat, that expression might return as [kingdom][kingdom rank][pex rank]%1$s: %2$s.
Them, you just need to set that expression with the format you want (note: use %1$s and %2$s for the player and message) and you wont need to cancel the chat event.
 
Status
Not open for further replies.