Banned Commands

Quick rating

Community listing page, reviews here may not be monitored by the author.

Banned Commands

By aajcOwner

No reviews yet

Server mod to prohibit configured commands based on dimension

Mod Loaders
Minecraft

About

Description

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