Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- kickmsg: &7Your not on the whitelist
- h: &a
- c: &f
- perms: skript.op
- bypass: skript.whitelist.bypass
- command /whitelist [<text>] [<text>]:
- aliases: /wl
- permission: {@perms}
- trigger:
- if arg-1 is "on":
- if {wl} is not set:
- set {wl} to true
- broadcast "{@c} Whitelist is now {@h}on!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else if {wl} is true:
- send "{@c} Whitelist is {@h}already on!" to command sender
- command "/playsound random.break %command sender% ~ ~ ~ 1 0.5 1"
- else if arg-1 is "off":
- if {wl} is true:
- delete {wl}
- broadcast "{@c} Whitelist is now {@h}off!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else if {wl} is not set:
- send "{@c} Whitelist is {@h}already off!" to command sender
- command "/playsound random.break %command sender% ~ ~ ~ 1 0.5 1"
- else if arg-1 is "list":
- if {wl::*} is set:
- send "{@c}{@h} Whitelisted Players: {@c}%{wl::*}%" to command sender
- command "/playsound random.pop %command sender% ~ ~ ~ 1 0.5 1"
- else:
- send "{@c} No players whitelisted!" to command sender
- command "/playsound random.break %command sender% ~ ~ ~ 1 0.5 1"
- else if arg-1 is "add":
- if arg-2 is set:
- if arg-2 is "all":
- loop all players:
- {wl::*} does not contain "%loop-player%"
- add "%loop-player%" to {wl::*}
- set {iswl::%loop-player%} to true
- broadcast "{@c}{@h} Everyone{@c} added to the whitelist!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else:
- if "%arg-2%" contains " ":
- set {_towl::*} to (arg-2) split at " "
- loop {_towl::*}:
- {iswl::%loop-value%} is not set
- add "%loop-value%" to {wl::*}
- set {iswl::%loop-value%} to true
- command sender is not console
- broadcast "{@c}{@h} %{_towl::*}%{@c} added to the whitelist!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else:
- if {iswl::%arg-2%} is not set:
- add "%arg-2%" to {wl::*}
- set {iswl::%arg-2%} to true
- command sender is not console
- broadcast "{@c}{@h} %arg-2%{@c} added to the whitelist!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else:
- send "{@c} You must specify a player to whitelist!" to command sender
- command "/playsound random.break %command sender% ~ ~ ~ 1 0.5 1"
- else if arg-1 is "remove":
- if arg-2 is set:
- if arg-2 is "all":
- delete {wl::*}
- delete {iswl::*}
- broadcast "{@c} Whitelist {@h}emptied!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else:
- if "%arg-2%" contains " ":
- set {_towl::*} to ((arg-2) split at " ")
- loop {_towl::*}:
- remove "%loop-value%" from {wl::*}
- delete {iswl::%loop-value%}
- loop all ops:
- send "{@c}{@h} %{_towl::*}%{@c} removed from the whitelist!" to loop-player
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else:
- remove "%arg-2%" from {wl::*}
- delete {iswl::%arg-2%}
- loop all ops:
- send "{@c}{@h} %arg-2%{@c} removed from the whitelist!" to loop-player
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else:
- send "{@c} You must specify a player to remove from whitelist!" to command sender
- command "/playsound random.break %command sender% ~ ~ ~ 1 0.5 1"
- else if arg-1 is "clear":
- delete {wl::*}
- delete {wl}
- delete {iswl::*}
- broadcast "{@c}Whitelist {@h}emptied{@c} and {@h}off!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- else:
- send "{@c} Correct Usage: {@h}/wl (on|off|list|clear)" to command sender
- send "{@c} Correct Usage: {@h}/wl (add|remove) <player>" to command sender
- command "/playsound random.break %command sender% ~ ~ ~ 1 0.5 1"
- command /whitelistall:
- permission: {@perms}
- aliases: /wlall
- trigger:
- set {wl} to true
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- {iswl::%loop-player%} is not set
- add "%loop-player%" to {wl::*}
- set {iswl::%loop-player%} to true
- broadcast "{@c}Everyone whitelisted, whitelist on!"
- on connect:
- {wl} is true
- if {iswl::%player%} is true:
- stop
- else if player has permission "{@bypass}":
- stop
- else:
- kick the player due to "{@kickmsg}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement