Aby zrobić szybkie usuwanie wszystkich z whitelisty, polecałbym zrobić zmienne w stylu {swhitelist::*} gdzie:
value - nick gracza, ktory ma pozwolenie na dostep do serwera.
Wtedy by można było wszystkich usunąć za pomocą delete {swhielist::*} i dodatkowo, od razu można wyświetlić wszystkich, którzy są na tej liście.
A jeżeli już robisz tym sposobem co zrobiłeś, to nie polecam ustawiać set {zmienna} to false tylko po prostu: clear {zmienna} jest to funkcjonalniejsze, gdyż wtedy zmienna nie jest przechowywana w RAM'ie.
A sprawdzasz if {zmienna} is true: lub if {zmienna} is set:
Pozdrawiam i życzę miłego pisania #Knugi
// Podoba mi się również że używasz efektu stop
Popatrz niżej i oceń który sposób jest ładniejszy:
command /swhitelist [<text>] [<offlineplayer>]:
permission: sk.whitelist.*
permission message: &7(&3sk.whitelist.*&7) &7Nie posiadasz tej permisji!
trigger:
if arg 1 is not "dodaj" or "usun" or "wlacz" or "wylacz" or "autor" or "restart":
send "&7Poprawne uzycie tej komendy (&3swhitelist dodaj&7/&3usun&7/&3wlacz&7/&3wylacz&7/&3restart&7/&3autor&7)."
stop
if arg 1 is not set:
send "&7Poprawne uzycie tej komendy (&3swhitelist dodaj&7/&3usun&7/&3wlacz&7/&3wylacz&7/&3restart&7/&3autor&7)."
stop
if arg 1 is "usun":
if arg 2 is not set:
send "&7Poprawne uzycie tej komendy (&3swhitelist usun &7(&3nick gracza&7)."
stop
else:
if {sk.%arg-2%.whitelist} is true:
send "&3&lSK &3%arg-2% &7zostal usuniety z whitelisty serwera!"
set {sk.%arg-2%.whitelist} to false
stop
else:
send "&3&lSK &3%arg-2% &7nie znajduje sie na whiteliscie serwerowej!"
stop
if arg 1 is "dodaj":
if arg 2 is not set:
send "&7Poprawne uzycie tej komendy (&3swhitelist dodaj &7(&3nick gracza&7)."
stop
if arg 2 is set:
if {sk.%arg-2%.whitelist} is false:
send "&3&lSK &3%arg-2% &7zostal dodany do whitelisty serwera!"
set {sk.%arg-2%.whitelist} to true
stop
else:
send "&3&lSK &3%arg-2% &7znajduje sie juz na whiteliscie!"
stop
command /swhitelist [<text>] [<offlineplayer>]:
permission: sk.whitelist.*
permission message: &7(&3sk.whitelist.*&7) &7Nie posiadasz tej permisji!
trigger:
if arg 1 is not "dodaj" or "usun" or "wlacz" or "wylacz" or "autor" or "restart":
send "&7Poprawne uzycie tej komendy (&3swhitelist dodaj&7/&3usun&7/&3wlacz&7/&3wylacz&7/&3restart&7/&3autor&7)."
stop
if arg 1 is not set:
send "&7Poprawne uzycie tej komendy (&3swhitelist dodaj&7/&3usun&7/&3wlacz&7/&3wylacz&7/&3restart&7/&3autor&7)."
stop
if arg 1 is "usun":
if arg 2 is not set:
send "&7Poprawne uzycie tej komendy (&3swhitelist usun &7(&3nick gracza&7)."
stop
if {sk.%arg-2%.whitelist} is true:
send "&3&lSK &3%arg-2% &7zostal usuniety z whitelisty serwera!"
set {sk.%arg-2%.whitelist} to false
stop
send "&3&lSK &3%arg-2% &7nie znajduje sie na whiteliscie serwerowej!"
stop
if arg 1 is "dodaj":
if arg 2 is not set:
send "&7Poprawne uzycie tej komendy (&3swhitelist dodaj &7(&3nick gracza&7)."
stop
if {sk.%arg-2%.whitelist} is false:
send "&3&lSK &3%arg-2% &7zostal dodany do whitelisty serwera!"
set {sk.%arg-2%.whitelist} to true
stop
send "&3&lSK &3%arg-2% &7znajduje sie juz na whiteliscie!"
stop
Oba działają tak samo