Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Creators
Details
🚀 McdrCmdSuggest
✨ A More Elegant MCDR Command Completion
This mod requires the use of the CommandSuggest plugin.
McdrCmdSuggest is a Fabric mod that provides a more elegant command completion experience for MCDReforged. By registering MCDR commands on the Minecraft server and sending them to the client, players can enjoy a native command completion experience.
🛠️ Features
- ⚡ Native command completion: Registers MCDR commands as native Minecraft commands, allowing silent execution of MCDR commands.
- 💡 Supports argument suggestion completion (the
suggests
method in MCDR plugins). - 🖥️ Pure server-side mod: No client installation required, compatible with vanilla clients.
- 🛡️ No mixin dependency: Easier to maintain across multiple versions.
- ⚙️ Fully automatic default configuration: Works out of the box without manual setup.
📦 Installation
- Download the latest version of McdrCmdSuggest from Modrinth or GitHub Releases.
- Place the downloaded jar file into the
mods
folder of your Minecraft server. - Install the corresponding MCDR plugin on the server.
- Restart the server.
📝 Usage
Enter existing MCDR commands in the standard Minecraft command format starting with /
, then use the Tab key in-game for command completion. For example, /!!help
, /!!MCDR xxx
(no need to configure other plugins or modify plugin code).
🔍 Comparison with Other Mods
Compared to other MCDR command completion mods, McdrCmdSuggest offers the following advantages:
- More elegant implementation: Directly utilizes Minecraft's native command system for a smoother user experience.
- More comprehensive features: Supports argument suggestion completion, suitable for more complex command structures.
- Better compatibility: MCDR commands can be completed even if they don't start with "!" or "!!", compatible with more plugins.
- Fewer dependencies: No mixin dependency, reducing potential maintenance costs, and no client mod required.
🧩 Technical Details
McdrCmdSuggest implements command completion as follows:
- Registers a special command
__mcdrcmdsuggest_register
to receive command registration information from the server. - Dynamically registers Minecraft commands based on the received information.
- If a command includes argument suggestions (
suggests
), a suggests method is added to query the corresponding MCDR plugin for suggestions (uses HTTP by default, only local communication between server and MCDR, no need to expose ports). Client suggestions are transmitted via Minecraft's native protocol.
🤝 Contributing
Issues and feature requests are welcome!
🙏 Acknowledgements
- MCDReforged - Powerful Minecraft server management framework.
- ZhuRuoLing/MCDRCommandCompletionReforged-Mod - Provided reference implementation.
- AnzhiZhang/MCDRCommandFabric - Provided reference implementation.
📄 Statement
This mod heavily references the code and implementation of ZhuRuoLing/MCDRCommandCompletionReforged-Mod and AnzhiZhang/MCDRCommandFabric. Without their work, this mod would not have been possible.
✨ 更优雅的MCDR命令补全实现
需要配合CommandSuggest插件使用。
McdrCmdSuggest是一个Fabric模组,为MCDReforged提供更优雅的命令补全功能。通过在Minecraft服务端中注册MCDR命令并发送到客户端,使玩家可以获得原生的命令补全体验。
🛠️ 特性
- ⚡ 原生命令补全体验:将MCDR命令注册为Minecraft原生命令,允许静默发送MCDR命令
- 💡 支持参数建议补全(MCDR插件中的suggests方法)
- 🖥️ 纯服务端Mod,客户端无需安装,支持原版客户端
- 🛡️ 不依赖mixins,更易于维护多版本
- ⚙️ 默认配置全自动,无需手动配置也可开箱即用
📦 安装
- 从Modrinth或GitHub Releases下载最新版本的McdrCmdSuggest
- 将下载的jar文件放入Minecraft服务端的mods文件夹中
- 在服务器端安装对应的MCDR插件
- 重启服务器
📝 使用方法
将原有的MCDR命令以/
开头的Minecraft标准命令形式输入,然后在游戏中使用Tab键进行命令补全即可。例如/!!help
, /!!MCDR xxx
(无需配置其它插件或修改插件代码)。
🔍 与其他模组的比较
与其他MCDR命令补全模组相比,McdrCmdSuggest提供了以下优势:
- 更优雅的实现:直接利用Minecraft原生的命令系统,提供更流畅的用户体验
- 更全面的功能:支持参数建议补全,适应更多复杂的命令结构
- 更好的兼容性:MCDR命令不以"!"或"!!"开头也可补全,兼容更多的插件
- 更少的依赖项:不依赖mixins,减少潜在的维护成本,无需客户端Mod
🧩 技术细节
McdrCmdSuggest通过以下方式实现命令补全:
- 注册一个特殊的命令
__mcdrcmdsuggest_register
,用于接收服务器发送的命令注册信息 - 根据接收到的信息,动态注册Minecraft命令
- 如果命令包含参数建议(suggests),则将为其添加suggests方法,向配套的MCDR插件查询建议结果(默认使用http,仅服务端和MCDR进行本地通讯,无需暴露端口),客户端的建议由Minecraft自带的通讯协议传输
🤝 贡献
欢迎提交问题报告和功能请求!
🙏 致谢
- MCDReforged - 强大的Minecraft服务器管理框架
- ZhuRuoLing/MCDRCommandCompletionReforged-Mod - 提供了参考实现
- AnzhiZhang/MCDRCommandFabric - 提供了参考实现
📄 声明
本模组大量参考了 ZhuRuoLing/MCDRCommandCompletionReforged-Mod 和 AnzhiZhang/MCDRCommandFabric 的代码和实现。没有他们的工作,这个模组不可能实现。