1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please Help with this (Whitelist Skript)

Discussion in 'Skript' started by Rodney_RWR, Apr 17, 2021.

Thread Status:
Not open for further replies.
  1. Rodney_RWR

    Rodney_RWR Member

    Joined:
    Apr 17, 2021
    Messages:
    3
    Likes Received:
    0
    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 (Text):
    1.  
    2. every 5 seconds:
    3.   loop all players:
    4.     if loop-player does not have permission "staff.mwl.bypass":
    5.       if {wl::%server%} is true:
    6.         execute console command "/kick %player% &cKicked Whilst Connecting to &4ClickB8MC &6Reason: &cWhitelist is on!"
    7.     else:
    8.       stop
     
  2. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Instead of executing /kick, try using the built-in kick effect provided by Skript.
    Code (Text):
    1. kick player because "&cKicked Whilst Connecting to &4ClickB8MC &6Reason: &cWhitelist is on!"
     
    • Agree Agree x 1
  3. Rodney_RWR

    Rodney_RWR Member

    Joined:
    Apr 17, 2021
    Messages:
    3
    Likes Received:
    0
    I will try this now!
     
  4. Julius Ohly

    Julius Ohly Member

    Joined:
    Mar 20, 2021
    Messages:
    19
    Likes Received:
    0
    you could also just do /whitelist on ingame ¯\_(ツ)_/¯
     
  5. Shadow501pl

    Shadow501pl Active Member

    Joined:
    Dec 19, 2020
    Messages:
    62
    Likes Received:
    2
    You can just do:
    Code (Text):
    1. on join:
    2.     if player has permission "permission.test":
    3.         message "&aYou are whitelisted!"
    4.     else:
    5.         kick player due to "&cYou are not whitelisted!"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...