Main command of a skript not showing up to normal players.

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

Dziaod

Member
Mar 1, 2020
1
0
0
I have a Skript that allows players to change their gamemode, but not in their world.


Code:
on command "/creative":
        if player has permission "essentials.gamemode.creative":
                exit
        else:
                if player is in world "HUB":
                        cancel event
                        send formatted formatted "&4You can only run this command in your personal world!"
                else:
                        cancel event
                        set gamemode of player to Creative
                        send formatted formatted "&6Set gamemode &ccreative &6for &c%colored player's prefix%player%colored player's suffix%&6."
on command "/adventure":
        if player has permission "essentials.gamemode.adventure":
                exit
        else:
                if player is in world "HUB":
                        cancel event
                        send formatted formatted "&4You can only run this command in your personal world!"
                else:
                        cancel event
                        set gamemode of player to Adventure
                        send formatted formatted "&6Set gamemode &cadventure &6for &c%colored player's prefix%player%colored player's suffix%&6."
on command "/spectator":
        if player has permission "essentials.gamemode.spectator":
                exit
        else:
                if player is in world "HUB":
                        cancel event
                        send formatted formatted "&4You can only run this command in your personal world!"
                else:
                        cancel event
                        set gamemode of player to Spectator
                        send formatted formatted "&6Set gamemode &cspectator &6for &c%colored player's prefix%player%colored player's suffix%&6."

on command "/survival":
        if player has permission "essentials.gamemode.survival":
                exit
        else:
                if player is in world "HUB":
                        cancel event
                        send formatted formatted "&4You can only run this command in your personal world!"
                else:
                        cancel event
                        set gamemode of player to Survival
                        send formatted formatted "&6Set gamemode &csurvival &6for &c%colored player's prefix%player%colored player's suffix%&6."

Somehow ethe commands only show up in the completer when I am Owner.
 
Code:
command creative:
    trigger:
        if player has permission "essentials.gamemode.creative":
            exit
        else:
            if player's world is "HUB":
                send "&4You can only run this command in your personal world!"
            else:
                set gamemode of player to Creative
                send "&6Set gamemode &ccreative &6for &c%player's display name%&6."
command adventure:
    trigger:
        if player has permission "essentials.gamemode.adventure":
            exit
        else:
            if player's world is "HUB":
                send "&4You can only run this command in your personal world!"
            else:
                set gamemode of player to Adventure
                send "&6Set gamemode &cadventure &6for &c%player's display name%&6."
command spectator:
    trigger:
        if player has permission "essentials.gamemode.spectator":
            exit
        else:
            if player's world is "HUB":
                send "&4You can only run this command in your personal world!"
            else:
                set gamemode of player to Spectator
                send "&6Set gamemode &cspectator &6for &c%player's display name%&6."
 
command survival:
    trigger:
        if player has permission "essentials.gamemode.survival":
            exit
        else:
            if player's world is "HUB":
                send "&4You can only run this command in your personal world!"
            else:
                set gamemode of player to Survival
                send "&6Set gamemode &csurvival &6for &c%player's display name%&6."
 
Status
Not open for further replies.