Solved Detecting if mode is already enabled broken

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

    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.

wesnoah3

Active Member
Aug 18, 2017
73
3
8
Skript Version: 1.12
Skript Author: bensku
Minecraft Version: 1.12

Code: https://pastebin.com/1L3HpFv4

Hello, I am creating a staffmode plugin and I am trying to make it detect if the mode is already on and stop it if you are trying to turn on staffmode while it is still enabled. No errors in console or from skript.

The first "if arg-1 is "on"" works and the message is sent but the second "if arg-1 is "off"" doesn't work and it just turns staffmode off again
 
Skript Version: 1.12
Skript Author: bensku
Minecraft Version: 1.12

Code: https://pastebin.com/1L3HpFv4

Hello, I am creating a staffmode plugin and I am trying to make it detect if the mode is already on and stop it if you are trying to turn on staffmode while it is still enabled. No errors in console or from skript.

The first "if arg-1 is "on"" works and the message is sent but the second "if arg-1 is "off"" doesn't work and it just turns staffmode off again
I may be missing something, but why are you checking if it's on if you are already checking if the variables are true or false? I believe that should effectively do the same thing.
 
I may be missing something, but why are you checking if it's on if you are already checking if the variables are true or false? I believe that should effectively do the same thing.
The reason why is because I have it save your current inventory when you enter staff mode and if you are able to do /sm on twice it saves your staffmode inventory but it seems to have fixed itself with another simple restart
 
Status
Not open for further replies.