Block/Unblock Command on Server Skript

  • 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.
Jun 5, 2022
4
0
1
24
Usage: /blockcmd [command], /unblockcmd [command]
Example: /blockcmd help
Code:
on command:
    if {blockcmd::*} contains command:
        cancel event
        send "This command is blocked."
command /blockcmd <text>:
    permission: op
    trigger:
        if arg-1 is set:
            if {blockcmd::*} contains arg-1:
                send "This command is already blocked!"
            else:
                add arg-1 to {blockcmd::*}
                send "Succesfully blocked command: /%arg-1%"
        else:
            send "Please enter a command."
command /unblockcmd <text>:
    permission: op
    trigger:
        if arg-1 is set:
            if {blockcmd::*} contains arg-1:
                remove arg-1 from {blockcmd::*}
                send "Succesfully unblocked command: /%arg-1%"
            send "Command is not blocked."
        else:
            send "Please enter a command."
 
Status
Not open for further replies.