Compatibility
Minecraft: Java Edition
1.21.1–1.21.11
Platforms
Supported environments
Dedicated servers only
Links
Tags
Creators
Details
Licensed GPL-3.0-or-later
Published 3 months ago
This is a simple mod that prevents commands from being run based on what dimension the player is in, regardless if the player has access to the command through a different permission management mod. Players with a permission level of 2 or more (ops) are exempt from restrictions.
This example config prevents /warp and /rtp from being used in the overworld, as well as any added parameters, such as /warp spawn. This also prevents /spawn from being used in all dimensions by default except for the overworld. The config is read from /config/bannedcommands.json and is automatically created if it does not exist.
{
"default": {
"denyMessage": "&cYou cannot use that command here.",
"commands": [
"spawn"
]
},
"minecraft:overworld": {
"denyMessage": "&cNo teleports in the overworld.",
"commands": [
"warp",
"rtp"
]
}
}
Commands (level 2/op only):
- /bannedcommands reload : Reloads the config
- /bannedcommands status : Displays the dimension id and commands listed for that dimension, for debugging purposes
This mod is open source and was created for the Cherry Cobblemon server: https://discord.gg/95mxCabJWf


