- command /color <string>:
- permission: color.use
- trigger:
- set {_c::*} to split "0123456789abcdef" at ""
- if {_c::*} does not contain arg-1:
- message "&cInvalid color! Use %join {_c::*} with "", ""%"
- else:
- set {color::%uuid of player%} to colored "&%arg-1%"
- message "&aColor changed to &%arg-1%%arg-1%"
- command /namecolor:
- permission: color.use
- trigger:
- open chest inventory with 3 rows named "&aChoose a color" to player
- set {_c::*} to split "0123456789abcdef" at ""
- set {_items::*} to black wool, blue wool, green wool, cyan wool, red wool, purple wool, orange wool, gray wool, dark gray wool, light blue wool, light green wool, light blue wool, pink wool, magenta wool, yellow wool, white wool
- set {_i} to 0
- loop {_c::*}:
- set {_t} to loop-value
- create gui slot {_i} of player with {_items::%loop-index%} named colored "&%loop-value%%loop-value%" to run:
- make player execute command "color %{_t}%"
- close inventory of player
- add 1 to {_i}
- on chat:
- {color::%uuid of player%} is set
- set nickname of player to "%{color::%uuid of player%}%%player%"
- # replace every "[player]" in chat format with "%{color::%uuid of player%}%[player]&r"
The problem: