AntiOPAbuse
面向 Paper/Purpur 26.3 (Java 25) 的管理员指令透明度插件。
版本 2.1.0 · Minecraft 26.3 · 服务端
AntiOPAbuse 监控特权指令的使用情况并使其可见。每当操作员(或配置的受众群体)执行敏感指令时,该插件可以在聊天中广播、写入轮换日志文件、打印到控制台,并可选择发送到 Discord webhook。
它不是什么。 尽管名字如此,AntiOPAbuse 不会阻止或取消任何操作。它是一个透明度和威慑工具:提供审计轨迹和工作人员可见性。坚定的操作员仍然可以禁用此插件或通过未覆盖的路径运行指令(见限制)。
功能
- 指令监控。 监控可配置的敏感指令基础名称列表,支持命名空间剥离(
/minecraft:give 变为 give)以及排除列表。
- 监控模式。
OP_ONLY(推荐)、PERMISSION(持有配置节点的玩家)或 ALL。可以包含控制台指令;指令方块覆盖尚未实现(见限制)。
- 聊天广播。 受众可选
ALL、STAFF(持有 antiopabuse.notify 权限者)或 NONE,带有可选的通知声音以及完整指令或仅基础名称的显示选项。
- 文件日志。 具有可配置大小限制的轮换日志文件,可选 UUID/IP 字段和自定义日期格式。
- 控制台日志记录 在 INFO 或 WARNING 级别。
- 可选 Discord webhook,支持用户名、嵌入颜色和速率限制。
- 本地化。 内置
en_US、pt_PT 和 fr_FR(MiniMessage);可选集成 PlayerSettings 以实现按玩家语言设置。
指令
单一指令 /antiopabuse,别名为 /aoa。
| 指令 |
描述 |
权限 |
/antiopabuse reload |
重新加载配置。 |
antiopabuse.admin |
/antiopabuse status |
显示当前监控状态。 |
antiopabuse.admin |
/antiopabuse test |
发送测试检测/广播。 |
antiopabuse.admin |
权限
| 节点 |
描述 |
默认值 |
antiopabuse.admin |
访问 /antiopabuse 管理指令。 |
op |
antiopabuse.notify |
当受众设置为 STAFF 时接收广播。 |
op |
antiopabuse.exempt |
完全豁免某玩家的监控。 |
false |
antiopabuse.exempt 节点默认为 false 是出于有意为之,以确保操作员不被豁免。
当监控模式为 PERMISSION 时,才会检查额外的节点(默认为 antiopabuse.monitored,可配置)。
配置
关键 config.yml 设置:
monitoring:
mode: OP_ONLY # OP_ONLY | PERMISSION | ALL
monitor-permission: "antiopabuse.monitored"
monitor-console: true
monitor-command-blocks: false # 尚未实现(见限制)
monitored-commands: # 基础名称;通过 startsWith 匹配
- execute # 代理指令 — 被监控以防止绕过列表
- function
- give
- gamemode
- op
- deop
- ban
- stop
# ... 以及更多
broadcast:
enabled: true
audience: ALL # ALL | STAFF | NONE
show-full-command: true
logging:
enabled: true
file: "logs/commands.log"
max-size-mb: 10
discord:
enabled: false
webhook-url: ""
限制
对您的期望保持诚实;将这些内容记录给您的工作人员:
- 代理指令。 检测基于基础指令名称的黑名单。
execute 和 function 默认被监控,因此 /execute run give ... 会被标记,但插件目前尚未递归解包 execute ... run <cmd> 以评估内部指令。考虑为您的环境将权限/插件管理指令(例如 lp、pex)添加到列表中。
- 指令方块 未被监控(
monitor-command-blocks 目前无效)。
- 非阻断工具。 AntiOPAbuse 无法阻止操作员禁用插件、编辑其配置或在无插件的情况下运行服务器。它的价值在于威慑和捕捉随意滥用行为。
安装
- 需要 Paper 或 Purpur 26.3 和 Java 25(2.0.0 运行于 26.2,1.x 运行于 1.21.x)。
- 将
AntiOPAbuse-2.0.0.jar 放入 plugins/ 目录并启动服务器以生成 config.yml。
- 审查
monitored-commands,选择您的 broadcast.audience,并可选地设置 Discord webhook,然后运行 /antiopabuse reload。
依赖
| 插件 |
用途 |
| PlayerSettings |
可选的按玩家语言解析(配套插件)。 |
无需必需的依赖项。无需数据库或 Web 服务器。
支持 / 源码
源码和问题反馈:
许可证
根据 GNU General Public License v3.0 发布。请参阅 LICENSE。
AntiOPAbuse
Admin command transparency for Paper/Purpur 26.3 (Java 25).
Version 2.1.0 · Minecraft 26.3 · Server-side
AntiOPAbuse watches privileged command usage and makes it visible. Every time an operator (or a
configured audience) runs a sensitive command, the plugin can broadcast it in chat, write it to a
rotating log file, print it to the console, and optionally post it to a Discord webhook.
What it is not. Despite the name, AntiOPAbuse does not block or cancel anything. It is a
transparency and deterrence tool: an audit trail plus visibility for staff. A determined operator
can still disable the plugin or run commands through paths that are not covered (see Limitations).
Features
- Command monitoring. Watches a configurable list of sensitive command base names, with
namespace stripping (
/minecraft:give becomes give) and an exclusion list.
- Monitoring modes.
OP_ONLY (recommended), PERMISSION (players holding a configured node),
or ALL. Console commands can be included; command-block coverage is not implemented (see
Limitations).
- Chat broadcast. Audience
ALL, STAFF (holders of antiopabuse.notify) or NONE, with an
optional notification sound and full-command or base-only display.
- File logging. Rotating log file with configurable size, optional UUID/IP fields and a custom
date format.
- Console logging at INFO or WARNING level.
- Optional Discord webhook with username, embed color and rate limiting.
- Localization. Bundled
en_US, pt_PT and fr_FR (MiniMessage); optional PlayerSettings
integration for per-player language.
Commands
Single command /antiopabuse with alias /aoa.
| Command |
Description |
Permission |
/antiopabuse reload |
Reload the configuration. |
antiopabuse.admin |
/antiopabuse status |
Show current monitoring status. |
antiopabuse.admin |
/antiopabuse test |
Send a test detection/broadcast. |
antiopabuse.admin |
Permissions
| Node |
Description |
Default |
antiopabuse.admin |
Access to /antiopabuse admin commands. |
op |
antiopabuse.notify |
Receives broadcasts when the audience is set to STAFF. |
op |
antiopabuse.exempt |
Exempts a player from monitoring entirely. |
false |
The antiopabuse.exempt node defaults to false on purpose so that operators are not exempt.
An additional node (default antiopabuse.monitored, configurable) is checked only when the
monitoring mode is PERMISSION.
Configuration
Key config.yml settings:
monitoring:
mode: OP_ONLY # OP_ONLY | PERMISSION | ALL
monitor-permission: "antiopabuse.monitored"
monitor-console: true
monitor-command-blocks: false # not implemented (see Limitations)
monitored-commands: # base names; matched by startsWith
- execute # proxy command — watched so it cannot bypass the list
- function
- give
- gamemode
- op
- deop
- ban
- stop
# ... and more
broadcast:
enabled: true
audience: ALL # ALL | STAFF | NONE
show-full-command: true
logging:
enabled: true
file: "logs/commands.log"
max-size-mb: 10
discord:
enabled: false
webhook-url: ""
Limitations
Be honest with your expectations; document these for your staff:
- Proxy commands. Detection is a denylist of base command names.
execute and function are
monitored by default so /execute run give ... is flagged, but the plugin does not yet recursively
unwrap execute ... run <cmd> to evaluate the inner command. Consider adding permission/plugin
management commands (e.g. lp, pex) to the list for your setup.
- Command blocks are not monitored (
monitor-command-blocks is currently a no-op).
- Not a block. AntiOPAbuse cannot stop an operator from disabling the plugin, editing its config
or running the server without it. Its value is deterrence and catching casual abuse.
Installation
- Requires Paper or Purpur 26.3 and Java 25 (2.0.0 runs on 26.2, 1.x on 1.21.x).
- Drop
AntiOPAbuse-2.0.0.jar into plugins/ and start the server to generate config.yml.
- Review
monitored-commands, choose your broadcast.audience, and optionally set a Discord
webhook, then run /antiopabuse reload.
Dependencies
| Plugin |
Purpose |
| PlayerSettings |
Optional per-player language resolution (companion plugin). |
No required dependencies. No database or web server.
Support / Source
Source and issues:
License
Released under the GNU General Public License v3.0. See LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧