options: changeChatNick: true changeTablistNick: true changeAboveHeadNick: true function removeColors(text: string, player: player) :: text: set {_colors::*} to integers from 0 to 9 and split "abcdefonmrkl" by "" set {_text::*} to {_text} split by "" loop {_colors::*}: if {_text} contains "&%loop-value%": {_player} doesn't have permission "nick.color.&%loop-value%" or "nick.color.all" loop {_text::*}: loop-value-2 = "&" {_text::%loop-index-2 parsed as int + 1%} = "%loop-value-1%" delete {_text::%loop-index-2%} delete {_text::%loop-index-2 parsed as int + 1%} set {_text} to join {_text::*} by "" return colored {_text} function skinOf(player: string) :: skin: set {_id} to url "http://tntwars.com/uuid.php?NAME=%{_player}%"'s line 1 set {_jsonResponse::*} to url "https://api.mineskin.org/generate/user/%{_id}%"'s contents set {_jsonResponse} to join {_jsonResponse::*} by "" set {_value} to content of json value "texture" from text (content of json value "data" from text {_jsonResponse}) set {_values::*} to content of json value's "value" and "signature" from text {_value} return skin with value {_values::1} signature {_values::2} on join: wait 3 ticks if {skinStorage::%player's uuid%} is set: set player's displayed skin to {skinStorage::%player's uuid%} if {nickStorage::%player's uuid%} is set: if {@changeChatNick} = true: set player's display name to {nickStorage::%player's uuid%} if {@changeTablistNick} = true: set player's mundosk tablist name to {nickStorage::%player's uuid%} if {@changeAboveHeadNick} = true: set player's nametag to {skinStorage::%player's uuid%} command /nick []: permission: nick.change permission message: &cYou don't have permission for this. executable by: players usage: /nick [new nick] description: Changes your above head,tablist and/or chat nick. trigger: if arg is set: set {_match} to uncolored (colored arg) if {_match} regex matches "\w{4,16}": set {nickStorage::%sender's uuid%} to removeColors(arg, sender) if {@changeChatNick} = true: set sender's display name to {nickStorage::%sender's uuid%} if {@changeTablistNick} = true: set sender's mundosk tablist name to {nickStorage::%sender's uuid%} if {@changeAboveHeadNick} = true: set sender's nametag to {nickStorage::%sender's uuid%} send "&aYour name has been set to &7""%colored arg%&7""" stop send "&cThe nickname can&7'&ct be less than &64&c characters or greater than &616&c and doesn&7'&ct accept any kind of special characters&7." stop if {@changeChatNick} = true: set sender's display name to sender's name if {@changeTablistNick} = true: set sender's mundosk tablist name to sender's name if {@changeAboveHeadNick} = true: set sender's nametag to sender's name send "&aYour name has been reset&7." command /skin []: permission: skin.change permission message: &cYou don't have permission for this. executable by: players and console usage: /skin [player] [ign] description: changes your skin to the skin of other person's IGN. trigger: if arg-2 is set: set {_skin} to skinOf(arg-2) if {_skin} is set: set arg-1's displayed skin to {_skin} set {skinStorage::%arg-1's uuid%} to {_skin} send "&aYour skin has been set to &6%arg-2%&7'&as skin." stop send "&cInvalid IGN&7,&c try again later or put other IGN&7." stop reset arg-1's displayed skin send "&aYour skin has been reset&7."