Skip to content

3. Command Blocking

lokka30 edited this page Jan 26, 2021 · 9 revisions

Command Blocking

About

Need to block players from accessing your plugins list?

Ever wanted to block specific arguments of commands, such as home in /f home?

Here are some examples that will hopefully get you going.

Examples

These are the lines to add to your commands list if you wish to block these command examples.

Block /say

  • Use /say

Block /version WorldEdit but not any other /version command

  • Use /version* WorldEdit
    • The * character after version indicates to CommandDefender that the command/argument is required in that position but it is not blocked.

Block home in /f home

  • Use /f* home
    • Will allow all /f commands except when the first argument is home

Block 3 in /plot visit 3

  • Use /plot* visit* 3
    • Will allow all /plot commands and /plot visit commands except when the third argument is 3.

Block Notch in any command's third argument

  • Use /* * * Notch
    • Will allow all commands unless the third argument is Notch

Block /jeff jane but not /jeff jill or any other /jeff ... command

  • Use /jeff* jane

Block the character * being used as the first argument in /hello (/hello *)

  • Use /hello* \*
    • The /* part is converted to * by CommandDefender as it indicates to the plugin that you want to block * but not allow any commands as if you used * instead of \*. This technique is used in programming and is named 'escaping'.

Still stuck?

Join the ArcanePlugins Discord Server so a developer may assist you.

Clone this wiki locally