I just need to know what errors come up and if it actually works (There are errors) Version: Whatever version Minehut uses
Code:
command /wl [<String>]:
permission: nitro.owner
permission message: &4You do not have the permission to do that!
cooldown: 20 ticks
cooldown message: &4Please do not spam the command!
trigger:
if arg-1 is set:
if arg-1 is "all":
set {wl.ops} to false
set {wl.event} to false
send "&6Un-whitelisted everything" to player
if arg-1 is "ops":
if {wl.ops} is true:
set {wl.ops} to false
send "&4Operators have been Un-whitelisted" to player
if {wl.ops} is false:
set {wl.ops} to true
send "&6Operators have been whilelisted!" to player
if arg-1 is "event":
if {wl.event} is true:
set {wl.event} false
send "&6Un-Whitelisted Event Players" to player
clear {wl.eventplayers::*}
if {wl.event} is false:
loop all players:
set {_team} to Bukkit.getScoreboardManager().getMainScoreboard().getPlayerTeam(loop-player)
if {_team} contains "events":
add loop-player to {wl.eventplayers::*}
send "&6Event players have been whitelisted" to player
else:
send "&4Invalid Usage!" to player
wait 1 tick
send "&6/wl ops | /wl all | /wl event" to player
on join:
if {wl.ops} is false:
if {wl.event} is false:
stop
if {wl.ops} is true:
if player has permission op:
stop
else:
if {wl.event} is true:
if {wl.eventplayers::*} contains player:
stop
else:
execute console command "/kick %player% &6You are not whitelisted on this server!"
else:
execute console command "/kick %player% &6You are not whitelisted on this server!"
else:
if {wl.event} is true:
if {wl.eventplayers::*} contains player:
stop
else:
execute console command "/kick %player% &6You are not whitelisted on this server!"
on load:
set {wl.ops} to false
set {wl.event} to false
loop all players:
if loop-player has permission "nitro.owner":
send "&6Whitelist has been by default turned off!" to loop-player