Help with Server Control Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

acai

Active Member
Oct 23, 2020
89
1
8
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
 
Status
Not open for further replies.