Skript crashes server

  • 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!

Mar 9, 2025
1
0
1
I made a skript that didn't allow anyone to be opped other than specific users, but when I try making myself op through console while being deopped the server crashed.
Can anyone tell me why?
The skript:

command /op [<player>]:
trigger:
if arg-1 != "(Other player)" or "(Me)":
make console execute command "/deop %arg-1%"
message "&cYou are not allowed to be an operator / make this user an operator on this server!"
else:
make console execute command "/op %arg-1%"
 
I made a skript that didn't allow anyone to be opped other than specific users, but when I try making myself op through console while being deopped the server crashed.
Can anyone tell me why?
The skript:

command /op [<player>]:
trigger:
if arg-1 != "(Other player)" or "(Me)":
make console execute command "/deop %arg-1%"
message "&cYou are not allowed to be an operator / make this user an operator on this server!"
else:
make console execute command "/op %arg-1%"
It creates an infinite command execution.

I don't know if you want it but you didn't add a permission to your command too.

Just do it like that:
Python:
options:
    opWhitelist: "me" or "other" or "other 2"

on command "op":
    if arg 1 isn't {@opWhitelist}:
        cancel event
        send "&cYou are not allowed to be an operator / make this user an operator on this server!"

And why would you need this, this isn't necessary.