Detect Color Codes and Change it

  • 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.

LoneElf

Active Member
Apr 30, 2017
165
2
18
24
So, I am making my own Item Nametag skript. It is 100% working, exept for this one thing. So, I have this:
code_language.skript:
command /rename <text>:
   trigger:
      set {new.name.%uuid of player%} to arg 1
      set tool of player to the player's tool named "%{new.name.%uuid of player%}%"
So, the thing is, if I were to do: /rename &bTest, it would rename it letter for letter: &bTest in white. I understand why it does that, but I don't know how to make it so it takes the color codes and renames the tool with the color codes, such as Test without &b but in Aqua. Thanks :emoji_slight_smile:

EDIT: If you know a bit of Java, I need something like a translateAlternateColorCodes or whatever the syntax is for that again where you can add color codes such as &b in messages and it will translate it to the color you want.
 
Last edited:
Status
Not open for further replies.