Players without op can't use a command with no required permissions

  • 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.
Not sure what you mean, there is no check if the player has a permission. And SkQuery GUIs are a big no, convert Vanilla GUIs.
For stuff like this you better use functions, for example:
Code:
function shop(p: player, category: text):
    if {_category} is "main":
        # do your category stuff
    else if {_category} is "redstone":
        # add redstone
    # just copy & paste to continue

command /shop [<text>]:
    trigger:
        shop(player, "main")

And a little advice on how to shorten things down:
Code:
            # wrong
            set {_slot} to 0
            loop 54 times:
                format gui slot {_slot} of player with gray glass named "&7"
                add 1 to {_slot}

            # right
            format gui slot (integers from 0 to 54) of player with gray glass named "&7"
 
Status
Not open for further replies.