?️♂️ CommandBlockSpy
简体中文
? CommandBlockSpy (CBS) 是一款专为高自由度(启用了命令方块)的 Minecraft 创意服务器设计的插件。它通过记录执行数据并提供命令控制与安全监控,帮助服务器管理员管理命令方块的运行活动。
✅ 已在 Minecraft 1.21.4 上测试,基于 Paper 构建。
✨ 插件功能
? 基于 SQLite 的执行日志记录
自动将每个命令方块的执行次数、命令内容、上次执行时间以及坐标记录到数据库中。
? 实时监控
提供可在控制台和玩家之间切换的命令实时监控功能。
? 危险命令拦截
支持自定义基于正则表达式的拦截规则,并在被拦截时显示可配置的消息。
? 循环命令方块拦截
可选择拦截始终处于开启状态(auto=true)的循环命令方块。
⚠️ 禁用命令方块矿车
可选择禁止玩家放置命令方块矿车。
? 可用命令
| Command |
Description |
Permission |
/cbspy |
切换聊天监控提示 |
cbspy.use |
/cbspy reload |
重新加载插件配置 |
cbspy.reload |
/cbspy query loc <x> <y> <z> |
查询特定位置的执行历史 |
cbspy.query |
/cbspy query recent <count> |
查询最近的 <count> 条执行记录 |
cbspy.query |
⚙️ 配置示例
注意:所有功能默认均为禁用状态。请根据需要进行启用。
# CBS插件配置文件
# CBS Plugin Configuration
# 插件语言,支持中文(zh_CN)和英文(en_US)
# Plugin language, supports Chinese (zh_CN) and English (en_US)
language: zh_CN
# 是否启用数据库功能
# Enable database logging
database-logging-enabled: false
# 是否开启后台命令执行日志监控,开启后控制台会打印命令方块执行记录
# Enable backend monitoring (logs to console)
backend-monitor-enabled: false
# 是否拦截循环命令方块保持开启(auto=true)的命令,拦截后会自动设置为红石控制
# Intercept always-on repeating command blocks (auto=true)
intercept-repeating-auto: false
# 是否禁止命令方块矿车,开启后玩家会无法放置命令方块矿车
# Disable command block minecarts
ban-command-minecart: false
# 是否启用基于正则表达式的命令拦截功能,拦截匹配规则的指令并提示原因
# Enable regex-based command interception
regex-intercept-enabled: false
# 正则表达式拦截列表,格式:正则表达式: 拦截提示信息
# Regex interception list
# 支持常见正则表达式语法,例如:
# Format: regex pattern : block message
regex-block-list:
- pattern: ^say
message: 禁止使用 say 命令! # The 'say' command is not allowed!
? 快速安装
-
下载插件:
-
安装到您的服务器:
- 将 JAR 文件放入您的
plugins/ 文件夹中
- 重启服务器
? 从源码构建与安装
克隆项目:
git clone https://github.com/GoldenEggs-Workshop/command-block-spy
cd command-block-spy
构建插件:
./gradlew build
将 build/libs/commandblockspy-xxx.jar 复制到服务器的 plugins/ 文件夹中,然后重启服务器。
? 权限节点
| Permission Node |
Description |
cbspy.use |
切换聊天警报 |
cbspy.reload |
重新加载插件配置 |
cbspy.query |
使用查询相关功能 |
? TODO 路线图
- 完整支持命令方块矿车(日志记录/拦截/禁用)
- 自定义数据库配置
- 多平台通知集成(飞书 / 钉钉 / Discord)
- 可视化查询界面
- √ i18n(国际化)支持
? 许可证
本项目采用 MIT 许可证。您可以自由修改和使用该插件。用于商业部署时,请注明原始来源。
?️♂️ CommandBlockSpy
简体中文
? CommandBlockSpy (CBS) is a plugin designed for creative Minecraft servers with high degrees of freedom (command blocks enabled). It helps server admins manage command block activity by recording execution data and offering command control and security monitoring.
✅ Tested on Minecraft 1.21.4, built on Paper.
✨ Plugin Features
? SQLite-Based Execution Logging
Automatically records each command block’s execution count, command content, last execution time, and coordinates into a database.
? Real-Time Monitoring
A toggleable real-time command monitoring system for both console and players.
? Dangerous Command Interception
Supports custom regex-based interception rules, with customizable messages when blocked.
? Repeating Command Block Interception
Optionally intercepts repeating command blocks that are always active (auto=true).
⚠️ Disable Command Block Minecarts
Optionally prevents players from placing command block minecarts.
? Available Commands
| Command |
Description |
Permission |
/cbspy |
Toggle chat monitoring prompts |
cbspy.use |
/cbspy reload |
Reload plugin configuration |
cbspy.reload |
/cbspy query loc <x> <y> <z> |
Query execution history of a specific location |
cbspy.query |
/cbspy query recent <count> |
Query the most recent <count> execution records |
cbspy.query |
⚙️ Configuration Example
Note: All features are disabled by default. Please enable them as needed.
# CBS插件配置文件
# CBS Plugin Configuration
# 插件语言,支持中文(zh_CN)和英文(en_US)
# Plugin language, supports Chinese (zh_CN) and English (en_US)
language: zh_CN
# 是否启用数据库功能
# Enable database logging
database-logging-enabled: false
# 是否开启后台命令执行日志监控,开启后控制台会打印命令方块执行记录
# Enable backend monitoring (logs to console)
backend-monitor-enabled: false
# 是否拦截循环命令方块保持开启(auto=true)的命令,拦截后会自动设置为红石控制
# Intercept always-on repeating command blocks (auto=true)
intercept-repeating-auto: false
# 是否禁止命令方块矿车,开启后玩家会无法放置命令方块矿车
# Disable command block minecarts
ban-command-minecart: false
# 是否启用基于正则表达式的命令拦截功能,拦截匹配规则的指令并提示原因
# Enable regex-based command interception
regex-intercept-enabled: false
# 正则表达式拦截列表,格式:正则表达式: 拦截提示信息
# Regex interception list
# 支持常见正则表达式语法,例如:
# Format: regex pattern : block message
regex-block-list:
- pattern: ^say
message: 禁止使用 say 命令! # The 'say' command is not allowed!
? Quick Installation
-
Download the plugin:
-
Install to your server:
- Place the JAR file into your
plugins/ folder
- Restart the server
? Build & Install from Source
Clone the project:
git clone https://github.com/GoldenEggs-Workshop/command-block-spy
cd command-block-spy
Build the plugin:
./gradlew build
Copy build/libs/commandblockspy-xxx.jar to your server's plugins/ folder, then restart the server.
? Permission Nodes
| Permission Node |
Description |
cbspy.use |
Toggle chat alerts |
cbspy.reload |
Reload plugin configuration |
cbspy.query |
Use query-related features |
? TODO Roadmap
- Full support for command block minecarts (logging/interception/disabling)
- Custom database configuration
- Multi-platform notification integration (Feishu / DingTalk / Discord)
- Visual query interface
- √ i18n (internationalization) support
? License
This project is licensed under the MIT License. You are free to modify and use the plugin. For commercial deployment, please credit the original source.
评论 0
登录后参与评分
还没有评论,来抢沙发吧