跳到正文

Banned Commands

作者:aajc

Server mod to prohibit configured commands based on dimension

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

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

常见问题

Banned Commands 支持哪些 Minecraft 版本?

Banned Commands 支持 Minecraft Java 版 1.21.1–1.21.11,共 11 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Banned Commands 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分