Code:
command /wl [<text>] [<offlineplayer>]:
trigger:
set {_player} to arg-2
set {_wl} to uuid of {_player}
if {rank::%sender%} is "normal":
NoPerms(sender, "SPECTATOR+")
else:
if arg-1 is "on":
if {whitelist} is false:
set {whitelist} to true
loop all players:
set {whitelisted::%loop-player's uuid%} to true
send "{@S} {@A} You were whitelisted by &5%sender% {@AA}" to all players
broadcast "{@S} {@A} Whitelist has been &aenabled. {@AA}"
execute console command "whitelist off"
else if {whitelist} is true:
message "{@S} {@A} Whitelist is already &aenabled. {@AA}" to command sender
execute console command "whitelist off"
else if arg-1 is "off":
if {whitelist} is true:
set {whitelist} to false
broadcast "{@S} {@A} Whitelist has been &cdisabled. {@AA}"
delete {whitelisted::*}
execute console command "whitelist off"
else if {whitelist} is false:
message "{@S} {@A} Whitelist has been &cdisabled. {@AA}" to command sender
delete {whitelisted::*}
execute console command "whitelist off"
else if arg-1 is "add":
if arg-2 is not set:
message "{@S} {@A} &7Please Choose A Player To Add To The Whitelist. {@AA}" to command sender
else:
set {whitelisted::%{_wl}%} to true
send "%{_wl}%" to player
send "{whitelisted::%{_wl}%}" to player
send "%{whitelisted::%{_wl}%}%" to player
broadcast "{@S} {@A} &5%arg-2% &7has been added to the whitelist by &5%sender%. {@AA}"
else if arg-1 is "remove":
if arg-2 is not set:
message "{@S} {@A} &7Please Choose A Player To Remove From The Whitelist. {@AA}" to command sender
else:
delete {whitelisted::%{_wl}%}
broadcast "&5{@S} {@A} &5%arg-2% &7has been removed from the whitelist by &5%sender%. {@AA}"
else if arg-1 is "list":
if {whitelisted::*} is not set:
send "{@Line2}%nl%&5Arcanum {@A} &bWhitelist is Empty%nl%{@Line2}" to player
else:
set {_w} to join all indexes of {whitelisted::*} with "&f,&7"
send "{@Line2}%nl%&5&lWhitelisted: &7%{_w} parsed as offlineplayers%%nl%{@Line2}" to player
else:
message "{@S} {@A} &cHelp §7(&5/wl§7) {@AA}" to command sender
message "{@S} {@A} &5/wl on §8- §fTurns Whitelist On and Whitelists Everyone {@AA}" to command sender
message "{@S} {@A} &5/wl off §8- §fTurns Whitelist Off and Clears Whitelist {@AA}" to command sender
message "{@S} {@A} &5/wl add <player> §8- §fAdd A Player To The Whitelist {@AA}" to command sender
message "{@S} {@A} &5/wl remove <player> §8- §fRemove A Player From The Whitelist {@AA}" to command sender
message "{@S} {@A} &5/wl list §8- §fShows Everyone On The Whitelist {@AA}" to command sender
why does/wl list give back <none> and not player names? if i remove the parsed as offline player part it gives back the uuids like it should but wont convert them to playernames.
if only one name is whitelisted it displays the name but if there are more than one theres an issue