This Skript Is Untested... Merry Christmas
# PLEASE NOTE: This Uses A Custom Chat Format. If You Are
# Currently Using A Custom Chat Format VIA Skript, Then
# Change This Skript To Your Needs
options:
# max-character-length description: the maximum amount of characters you can have in a nickname. (minimum value can be 1)
max-character-length: 16
# min-character-length description: the minimum amount of characters you can have in a nickname. (minimum value can be 1)
min-character-length: 1
# allow-colors descripton: (true/false) allow colors in nicknames
allow-colors: true
# nickname-prefix description: ("~" by default) if a player has a nickname, the set prefix will be behind their nick. Set to "NONE" for no prefix
nickname-prefix: ~
# command-base description: ("nick" by default) set the command base to the set value (e.g. /nick <Name> <Nick> could be /setmyname <Name> <Nick>)
command-base: nick
# usage-permission description: ("sknick.use" by default) set the permission node for use of the command. Set to "NONE" for no permission needed
usage-permission: sknick.use
command {@command-base} [<text>] [<text>]:
trigger:
if "{@usage-permission}" = "NONE":
set {_canuse} to true
else if player has permission "{@usage-permission}":
set {_canuse} to true
if {_canuse} is not set:
send "&cYou cannot use this command!" to player
stop
if arg-1 is not set:
send "&6/{@command-base} <Set/Unset>" to player
stop
if arg-1 is "set":
if arg-2 is not set:
send "&6/{@command-base} Set <Nick>%nL%&7Your nick must be between {@min-character-length} and {@max-character-length} characters long" to player
else:
if length of arg-2 > {@max-character-length}:
send "&cYour nickname is too long!" to player
stop
if length of arg-2 < {@min-character-length}:
send "&cYour nickname is too short!" to player
stop
if {@allow-colors} is true:
set {Nick::%player's uuid%} to colored arg-2
send "&6Your nick has been changed to %colored arg-2%" to player
stop
if {@allow-colors} is false:
set {Nick::%player's uuid%} to uncolored arg-2
send "&6Your nick has been changed to %uncolored arg-2%" to player
stop
else if arg-1 is "unset":
clear {Nick::%player's uuid%}
send "&6Your nick has been removed!" to player
else:
send "&6/{@command-base} <Set/Unset>" to player
on chat:
if "{@nickname-prefix}" = "NONE":
set {_nickfinal} to {Nick::%player's uuid%}
else:
set {_nickfinal} to "{@nickname-prefix}%{Nick::%player's uuid%}%"
if {Nick::%player's uuid%} is set:
set chat format to "<%{_nickfinal}%&f>: %message%"
else:
set chat format to "<%player%>: %message%"