GeyserCommandsYML
GeyserCommandsYML 是一款轻量级插件,专为使用 Geyser-Spigot 的服务器设计,旨在更好地控制向基岩版(Bedrock Edition)玩家显示的建议命令列表。
与其通过 Geyser-Spigot 配置(即 Geyser-Spigot\config.yml → command-suggestions: false)完全禁用所有服务器命令建议,此插件直接挂钩到 Geyser 和 Floodgate API,允许你为仅限基岩版玩家定义自己的自定义命令列表——从而避免崩溃、冗余或暴露无关命令。
功能
- ✅ 添加可自定义的可见命令列表,专供基岩版玩家使用。
- ✅ 无需全局禁用 Geyser 的命令建议功能。
- ✅ 简单的 YAML 配置文件(
plugins/GeyserCommandsYML/commands.yml)。
- ✅ 支持外部配置编辑的热重载(附带受控的玩家踢出机制)。
- ✅ 极其轻量——仅拦截
PlayerCommandSendEvent 并针对基岩版客户端进行修改。
命令
| 命令 |
描述 |
权限 |
/geysercommands add <command> |
将命令添加到基岩版命令列表中。 |
geysercommands.add |
/geysercommands remove <command> |
从基岩版命令列表中移除命令。 |
geysercommands.remove |
/geysercommands list |
在聊天栏中列出当前注册的所有基岩版命令。 |
geysercommands.list |
/geysercommands reload |
重新加载插件配置并更新基岩版命令列表(强制基岩版玩家重新连接)。 |
geysercommands.reload |
别名:
/geysercommandsyml, /gcyml
工作原理
权限概览
| 权限 |
用途 |
geysercommands.add |
允许向基岩版命令列表中添加命令。 |
geysercommands.remove |
允许从基岩版命令列表中移除命令。 |
geysercommands.list |
允许查看当前的基岩版命令列表。 |
geysercommands.reload |
允许重新加载插件配置并强制基岩版玩家重新连接。 |
- 如果玩家缺乏所需权限,他们将无法访问子命令。
- 服务器操作员(Server Operators)默认拥有命令访问权限。
测试环境
- ✅ PaperMC 1.21.4 - Build #226: 兼容
- ✅ Geyser-Spigot - Build #816: 兼容
- ✅ Floodgate - Build #116: 兼容
GeyserCommandsYML
GeyserCommandsYML is a lightweight plugin designed for servers using Geyser-Spigot to allow better control over the command suggestion list shown to their Bedrock Edition players.
Rather than disabling all of the server command suggestions entirely through the Geyser-Spigot configuration (aka Geyser-Spigot\config.yml → command-suggestions: false), this plugin hooks directly into Geyser + Floodgate APIs, letting you define your own custom list of commands only for Bedrock players — avoiding crashes, bloat, or exposing irrelevant commands.
Features
- ✅ Add your own customizable list of visible commands for Bedrock players.
- ✅ Prevents the need to disable Geyser's command suggestions globally.
- ✅ Simple YAML configuration (
plugins/GeyserCommandsYML/commands.yml).
- ✅ Hot-reloading support for external config edits (with controlled player kick).
- ✅ Very lightweight — simply intercepts
PlayerCommandSendEvent and modifies it for Bedrock clients.
Commands
| Command |
Description |
Permission |
/geysercommands add <command> |
Adds a command to the Bedrock command list. |
geysercommands.add |
/geysercommands remove <command> |
Removes a command from the Bedrock command list. |
geysercommands.remove |
/geysercommands list |
Lists all currently registered Bedrock commands in chat. |
geysercommands.list |
/geysercommands reload |
Reloads the plugin configuration and updates the Bedrock command list (forces Bedrock players to reconnect). |
geysercommands.reload |
Aliases:
/geysercommandsyml, /gcyml
How it Works
-
On PlayerCommandSendEvent, the plugin:
- Checks if the player is a Bedrock client (via Geyser/Floodgate APIs).
- If yes, it clears the default command suggestion list.
- Then it adds only the commands defined in the plugin's YAML file.
-
The Geyser client pulls the available commands at player join, not dynamically —
therefore, after running /geysercommands reload, Bedrock players must rejoin to see the updated list.
(This command automatically kicks Bedrock players with a kind message asking them to rejoin.)
-
Important:
- In
Geyser-Spigot\config.yml, ensure command-suggestions: true is set.
- The
/geysercommands add <command> and /geysercommands remove <command> commands do not kick players.
- But keep in mind, online Bedrock players won't see updated command lists until they manually leave and rejoin.
Permissions Overview
| Permission |
Purpose |
geysercommands.add |
Allows adding commands to the Bedrock command list. |
geysercommands.remove |
Allows removing commands from the Bedrock command list. |
geysercommands.list |
Allows viewing the current Bedrock command list. |
geysercommands.reload |
Allows reloading the plugin configuration and forcing Bedrock players to reconnect. |
- If a player lacks the required permission, they will be denied access to the subcommand.
- Server Operators maintain default command access.
Tested Environments
- ✅ PaperMC 1.21.4 - Build #226: Compatible
- ✅ Geyser-Spigot - Build #816: Compatible
- ✅ Floodgate - Build #116: Compatible
评论 0
登录后参与评分
还没有评论,来抢沙发吧