Managing Permissions
Manage and override command permissions
Edit on GitHubManaging Permissions
Command permission management allows you to override the default permissions of commands, set new permissions on commands that originally had none, and query current permission settings.
Commands
Set Command Permission
Usage: /command permission set <command> <permission>
Sets or overrides the permission required to execute a command.
Examples:
# Set permission on specific commands
/command permission set luckperms luckperms.use
/command permission set fly essentials.fly
/command permission set gamemode server.admin.gamemode
# Set permission on all commands
/command permission set "*" server.admin.all
# Set permission on all bukkit namespaced commands
/command permission set "bukkit:*" server.admin.bukkit
# Set permission on all namespaced commands
/command permission set "*:*" plugin.commandsQuery Command Permission
Usage: /command permission query <command>
Displays the current permission setting for a command.
Examples:
# Query specific commands
/command permission query luckperms
/command permission query fly
# Query all commands
/command permission query "*"
# Query all bukkit namespaced commands
/command permission query "bukkit:*"
# Query all namespaced commands
/command permission query "*:*"Reset Command Permission
Usage: /command permission reset <command>
Removes any permission override and restores the command's original permission.
Examples:
# Reset specific commands
/command permission reset luckperms
/command permission reset fly
# Reset all permission overrides
/command permission reset "*"
# Reset all bukkit namespaced commands
/command permission reset "bukkit:*"
# Reset all namespaced commands
/command permission reset "*:*"Unset Command Permission
Usage: /command permission unset <command>
Removes the permission requirement from a command, making it usable by everyone.
Examples:
# Unset permission on specific commands
/command permission unset help
/command permission unset rules
# Unset permissions on all commands
/command permission unset "*"
# Unset permissions on all bukkit namespaced commands
/command permission unset "bukkit:*"
# Unset permissions on all namespaced commands
/command permission unset "*:*"Be careful when unsetting permissions from commands that should be restricted.
Use Cases
Adding Permissions to Unrestricted Commands
Many plugins provide commands without permission requirements. Add security:
# Add permission to LuckPerms commands
/command permission set luckperms luckperms.admin
/command permission set perms luckperms.admin
# Add permission to economy commands
/command permission set eco economy.admin
/command permission set balance economy.userRestricting Powerful Commands
Add additional security layers:
# Make gamemode command require admin permission
/command permission set gamemode server.admin.gamemode
# Make world management commands require specific permissions
/command permission set world server.admin.world
/command permission set mv server.admin.multiverseWorld/Server-Specific Permissions
Use permission plugins to grant command access only in certain contexts:
# Set a permission that's only granted in creative world
/command permission set fly creative.fly
# Set a permission that's only granted on specific servers
/command permission set tp hub.teleportDebugging Permission Issues
Check what permissions are actually being enforced:
/command permission query fly
/command permission query gamemode
/command permission query homeConfiguration
Permission overrides are stored in a JSON configuration file.
The file maps command names to their permission overrides.
{
"luckperms": "luckperms.admin",
"fly": "essentials.fly",
"gamemode": "server.admin.gamemode",
"eco": "economy.admin"
}Tips
- Commands are referenced without the
/prefix in the configuration - Use
/command reloadto reload the configuration if manually edited - Use
/command saveto ensure changes are persisted to disk - Query permissions before making changes to understand the current state
- Use permission plugins to grant the new permissions to specific users, groups, or worlds
Last updated on