Code:
on join:
if player has permission "whitelist.bypass":
cancel event
else:
if {whitelist} is 1:
if "%{whitelist::*}%" doesn't contain "%player%":
kick player due to "You're not on the whitelist!"
else:
if {whitelist} is 0:
cancel event
else:
if {whitelist} is unset:
cancel event
command /serverctrl [<text>] [<text>]:
permission: skunity.sctrl
trigger:
if arg-1 is not set:
open virtual chest inventory with size 1 named "&1&lServer Control GUI" to player
format gui slot 0 of player with red stained glass pane named "&4&lSTOP" to run server command "/stop"
format gui slot 1 of player with green stained glass pane named "&a&lRESTART" to run server command "/restart"
format gui slot 2 of player with blue stained glass pane named "&3&lRELOAD DATAPACKS" to run server command "/minecraft:reload"
format gui slot 3 of player with yellow stained glass pane named "&e&lRELOAD SKRIPT" to run server command "/sk reload all"
format gui slot 4 of player with light blue stained glass pane named "&b&lRELOAD SERVER" to run server command "/reload"
format gui slot 5 of player with paper named "&f&lWHITELIST TOGGLE" to run server command "/serverctrl whitelist toggle"
else:
if arg-1 is "whitelist":
if arg-2 is "toggle":
if {whitelist} is 1:
set {whitelist} to 0
else:
if {whitelist} is 0:
set {whitelist} to 1
add %player% to {whitelist::*}
This skript wont toggle the whitelist
Version 2.5-alpha5 i think
Server version 1.15.2, paper/tuinity