Command Registration
Completely remove or restore commands from the server
Edit on GitHubUnregistering Commands
Unregistering a command allows you to completely remove commands from the server.
Unlike hiding, unregistered commands cannot be executed by anyone.
Commands
Unregister a Command
Usage: /command unregister <command>
Completely removes a command from the server.
Examples:
# Unregister specific commands
/command unregister op
/command unregister deop
/command unregister stop
# Unregister all commands (use with extreme caution!)
/command unregister "*"
# Unregister all bukkit namespaced commands
/command unregister "bukkit:*"
# Unregister all namespaced commands
/command unregister "*:*"Using /command unregister "*" will remove ALL commands from the server, including /command itself.
For this reason the fallback command /commander:command is exempt from unregistering.
If you messed up, you can use /commander:command register "*" to restore all commands.
Register a Command
Usage: /command register <command>
Restores a previously unregistered command, making it available again.
Examples:
# Register specific commands
/command register op
/command register deop
# Register all unregistered commands
/command register "*"
# Register all bukkit namespaced commands
/command register "bukkit:*"
# Register all namespaced commands
/command register "*:*"Use Cases
Security Hardening
Remove dangerous commands that should never be used:
/command unregister op
/command unregister deop
/command unregister stop
/command unregister reloadTemporary Disabling
Unregister commands temporarily during events or maintenance:
/command unregister tpa
/command unregister home
/command unregister warp
/command unregister plotmenuServer-Specific Commands
Unregister commands that don't apply to your server type:
/command unregister gamemode
/command unregister heal
/command unregister flyConfiguration
Unregistered commands are stored in a JSON configuration file.
The file contains a simple array of command names that should be unregistered.
[
"op",
"deop",
"stop",
"reload"
]Tips
- Commands are unregistered without the
/prefix in the configuration - Both the main command and aliases should be unregistered if desired
- Use
/command reloadto reload the configuration if manually edited - Use
/command saveto ensure changes are persisted to disk - Consider using command hiding instead of unregistering if you still want administrators to use the command
Difference from Hiding
| Feature | Hide | Unregister |
|---|---|---|
| Command execution | Still possible | Completely removed |
| Who can use | Anyone who knows it | Nobody |
| Administrator access | Yes (with bypass) | No |
| Use case | Clean UI | Security/Disabling |
Last updated on