1. 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!


    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Chat color plugin

Discussion in 'Skript' started by TurtleGamerz, Jun 29, 2017.

Thread Status:
Not open for further replies.
  1. TurtleGamerz

    TurtleGamerz Member

    Jun 4, 2017
    Likes Received:
    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
  2. ShaneBee

    Resource Staff Supporter + Addon Developer

    Sep 7, 2017
    Likes Received:
    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.
Thread Status:
Not open for further replies.