Please Help with this (Whitelist 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.

Rodney_RWR

Member
Apr 17, 2021
3
0
1
22
Script Version: 2.5.3-MH
Minecraft Version: 1.16.5
Full Code: https://pastebin.com/dfTKAZc7



Errors on Reload: There's no world in a periodic event if no world is given in the event (e.g. like 'every hour in "world"') (mwl.sk, line 34: execute console command "/kick %player% &cKicked Whilst Connecting To &4<my server's name> &6Reason: &c Whitelist is on!")


Other Useful Info: There is a full code behind it (shouldn't be affecting this part though.)

Addons using: TuSKe 1.8.2-Pickachu-Patch-3 (EssentialsX)

Have you tried searching the docs? Yes
Have you tried searching the Forums? Yes
What other methods have you tried to fix it? Different ways of coding it.

Part With error

Code:
every 5 seconds:
  loop all players:
    if loop-player does not have permission "staff.mwl.bypass":
      if {wl::%server%} is true:
        execute console command "/kick %player% &cKicked Whilst Connecting to &4ClickB8MC &6Reason: &cWhitelist is on!"
    else:
      stop
 
Instead of executing /kick, try using the built-in kick effect provided by Skript.
Code:
kick player because "&cKicked Whilst Connecting to &4ClickB8MC &6Reason: &cWhitelist is on!"
 
You can just do:
Code:
on join:
    if player has permission "permission.test":
        message "&aYou are whitelisted!"
    else:
        kick player due to "&cYou are not whitelisted!"
 
Status
Not open for further replies.