help

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

DarklordX89

Active Member
Nov 2, 2019
57
0
6
so im having trouble making a command blocker not one of those minecraft : pl blockers but actual commands i would need to disable if someone found a dupe with one of them
Code:
command /commandblocker [<text>] [<text>]:
    aliases: cb
    trigger:
        player has permission "MarsCore.commandblocker":
            if arg-1 is set:
                if arg-1 is "list":
                    if {commands::*} is not set:
                        send "&c&lCB ➡ &6No commands have been blocked" to player
                        stop
                    else:
                        send "&c&lCB ➡ &6%{commands::*}%" to player
                        stop
                if arg-1 is "add":
                    if arg-2 is set:
                        if arg-2 contains {commands::*}:
                            send "&c&lCB ➡ &6This command has already been blocked" to player
                            stop
                        else:
                            add arg 2 to {commands::*}
                            send "&c&lCB ➡ &6Added /%arg-2% to the blocked commands" to player
                            stop
                    else:
                        send "&cUsage: /cb <add/remove/list> <command>" to player
                        stop
                if arg-1 is "remove":
                    if arg-2 is set:
                        remove arg 2 from {commands::*}
                        send "&c&lCB ➡ &6Removed /%arg-2% from the blocked commands" to player
                        stop
                    else:
                        send "&cUsage: /cb <add/remove/list> <command>" to player
                        stop
                if arg-1 is "purge":
                    delete {commands::*}
                    send "&aDone" to player
            else:
                send "&cUsage: /cb <add/remove/list> <command>" to player
                stop

on command:
    if command contains {commands::*}:
        cancel event
        send "&cThat command is disabled"
 
Describe your issue in more detail.
What is your code supposed to do, what does it do, is there any error codes ect.
 
Status
Not open for further replies.