Hot Summer Deals are Here!
Celebrate with up to 99% off on 17,300 resources
02
Days
20
Hours
40
Mins
51
Secs

Block Commands | Simple | Clean | Skript | FREE

Status
This thread has been locked.

Hassan R.

Hassan#2565
Premium
Feedback score
4
Posts
284
Reactions
77
Resources
0
Hello! I'm here to introduce one of my first basic but useful scripts (written in Skript). This script allows you to block and/or unblock any command you wish!
Features
  • /block [insert command here without /]
  • /unblock [insert command here without /]
  • Fully configurable messages!
Permissions
  • Supports PermissionsEX system
  • command.block
  • command.unblock
Dependencies
Installation
  1. Download Skript 2.2 plugin from the link above
  2. Drop the .jar into your plugin folder
  3. Run your server
  4. A folder 'Skript' should be in your plugins folder
  5. Inside that folder, press 'scripts'
  6. Drop the .sk file inside that folder
  7. Run command /skript load Book Commands
DOWNLOAD .SK FILE HERE

Code
Code:
options:

# // CONFIGURABLE MESSAGES
    desc: &4Allows to block any command!
    desc2: &4Allows to unblock any blocked command!
    commandBlocked: &4You have blocked the command!
    alreadyBlocked: &4This command is already blocked!
    listblockedCommands: &4Blocked commands: &6%{blockedcommands::*}%
    commandisBlocked: &4This command is blocked!
    specifyCommand: &4You must specify a command!
    commandisnotBlocked: &4This command is not blocked!

# // CHANGE PERMISSIONS    BELOW HERE     
    permissiontoblock: command.block
    permissiontounblock: command.unblock
    permissionmessage: &4You do not have permission!
   
# // Do not EDIT anything below!

command /block <text>:
    description: {@desc}
    permission: {@permissiontoblock}
    permission message: {@permissionmessage}
    trigger:
        if arg-1 is set:
            if {blockedcommands::*} contains "%arg-1%":
                send "{@alreadyBlocked}"
            else:
                add argument-1 to {blockedcommands::*}
                send "{@commandBlocked}"
                send "{@listblockedCommands}"
        else:
            send "{@specifyCommand}"

command /unblock <text>:
    description: {@desc2}
    permission: {@permissiontounblock}
    permission message: {@permissionmessage}
    trigger:
        if arg-1 is set:
            remove "%arg-1%" from {blockedcommands::*}
            send "{@listblockedCommands}"
        else:
            send "{@specifyCommand}"
           
on command:
    loop {blockedcommands::*}:
        if command is loop-value:
            cancel event
            send "{@commandisBlocked}"
            stop loop




Blocking a command:

65797d225ac85b4380efc38b76a10c4a.gif


Unblocking a command:
c5a8fdd5c12eafbd88cdc56297fb15de.gif


If you like it, let me know.
And also if you want to tell me how shitty it is, I'd love to know.
But enjoy! (for those who use it)
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.
Status
This thread has been locked.
Top