注意: 本描述由 AI 生成,欢迎提供您的建议!
? ChatModifier
适用于学校 Minecraft 服务器的聊天插件(PaperMC 1.20.x / 1.21.x)
ChatModifier 彻底重构了聊天和玩家通信功能——它允许将消息范围限制在可配置的半径内,处理私聊、仅限工作人员的全球广播以及管理员间谍模式。它可选择集成 LuckPerms 以显示等级前缀。
✨ 特性
? 带范围的本地聊天
- 只有配置半径内的玩家才能看到消息
- 设置为
0 = 无限范围(整个世界)
- 可配置消息间隔冷却时间
- 忽略旁观者模式和隐身玩家
? 喊话 (/shout, /s, /krzyk)
- 向服务器上的所有玩家广播一条消息
- 可在 config.yml 中配置较长的冷却时间
- 所有玩家均可使用(无需权限)
? 全局 (/global, /g)
- 工作人员广播,所有人都可见
- 需要
chatmodifier.command.global 权限
- 可在 config.yml 中禁用
? 私聊 (/msg, /reply)
- 向特定玩家发送私密消息
/reply(或 /r)回复上一次对话的伙伴
- 正确处理隐身/旁观者玩家
- Tab 补全根据权限过滤隐藏的玩家
?️ 聊天间谍 (/spy)
- 聊天间谍和私聊间谍有独立的开关
- 拦截的消息会加上
[SPY] 前缀
- 需要
chatmodifier.spy 权限
? 消息过滤器
- 阻止不允许的字符(可配置的正则表达式)
- config.yml 中的封禁词列表
- LuckPerms 集成:聊天中显示等级前缀
? 安装
- 从 GitHub 下载
.jar 文件
- 将其放入服务器的
plugins/ 文件夹
- 启动服务器——配置文件会自动生成
- 编辑
plugins/ChatModifier/config.yml 和 lang.yml
- 使用
/reload confirm 重载或重启服务器
要求:
- PaperMC 1.20.x 或 1.21.x
- Java 21+
- LuckPerms(可选——用于显示等级前缀)
? 命令
| 命令 |
别名 |
描述 |
权限 |
/shout <message> |
/s, /krzyk |
向整个服务器广播(应用冷却时间) |
(无——所有人) |
/global <message> |
/g |
工作人员广播 |
chatmodifier.command.global |
/msg <player> <message> |
/tell, /w, /message |
私密消息 |
(无——所有人) |
/reply <message> |
/r |
回复上一条私密消息 |
(无——所有人) |
/spy |
— |
显示间谍状态 |
chatmodifier.spy |
/spy chat |
— |
切换聊天间谍 |
chatmodifier.spy |
/spy msg |
— |
切换私密消息间谍 |
chatmodifier.spy |
? 权限
| 权限 |
默认值 |
描述 |
chatmodifier.command.global |
false |
访问 /global |
chatmodifier.cooldown.bypass |
false |
跳过聊天冷却时间 |
chatmodifier.spy |
op |
访问 /spy |
chatmodifier.seehidden |
false |
在 /msg Tab 补全中看到隐藏/隐身的玩家 |
LuckPerms 示例
/lp group admin permission set chatmodifier.command.global true
/lp group admin permission set chatmodifier.spy true
/lp group vip permission set chatmodifier.cooldown.bypass true
⚙️ 配置
config.yml
# ------- [ CHAT ] ------- #
chat:
distance: 32 # 消息半径(方块数)(0 = 无限)
cooldown: 1500 # 消息间隔时间(毫秒)
# ------- [ BANNED WORDS ] ------- #
banned-words: []
# 示例: ["badword", "spam"]
# ------- [ GLOBAL ] ------- #
global:
enabled: true
# ------- [ SHOUT ] ------- #
shout:
enabled: true
cooldown: 150000 # 冷却时间(毫秒)(默认 2.5 分钟)
# ------- [ COMMANDS ] ------- #
# 启动时注册的额外别名(除内置别名外)。
# 更改这些值后请重启服务器。
# 内置: shout=[krzyk, s] global=[g] msg=[tell, w, message] reply=[r]
commands:
shout:
extra-aliases: []
global:
extra-aliases: []
msg:
extra-aliases: []
reply:
extra-aliases: []
spy:
extra-aliases: []
聊天半径参考
distance 值 |
效果 |
0 |
无限(整个世界) |
32 |
32 方块内可见 |
64 |
64 方块内可见 |
喊话冷却参考
shout.cooldown 值 |
持续时间 |
60000 |
1 分钟 |
150000 |
2.5 分钟 |
300000 |
5 分钟 |
900000 |
15 分钟 |
lang.yml
所有面向玩家的消息都位于 plugins/ChatModifier/lang.yml 中。编辑任何值以自定义文本。颜色代码使用 &(例如 &c = 红色,&a = 绿色,&7 = 灰色)。占位符已在文件内记录。
chat:
no-recipients: "&c[CM] Nobody heard you - No players within {distance} blocks!"
shout:
cooldown: "&c[CM] You must wait {minutes}min. {seconds}s. before using this command again."
添加自定义命令别名
要添加自定义别名(例如将 /bc 作为 /shout 的别名),请编辑 config.yml 并重启:
commands:
shout:
extra-aliases: [ bc, broadcast ]
? LuckPerms 集成
当安装了 LuckPerms 时,插件会自动获取每个玩家的前缀并将其添加到聊天消息中:
[Admin] Dominik: Hello!
如果没有 LuckPerms,则只显示玩家名称:
Dominik: Hello!
? 版本历史
1.0.0
- 首次发布
- 带半径和冷却时间的本地聊天
- 命令:
/shout, /global, /msg, /reply, /spy
- 在 config.yml 中为每个命令配置额外的别名
- LuckPerms 集成
- 支持 Minecraft 1.20.x 和 1.21.x
? 故障排除
插件无法加载
- 检查服务器版本——需要 Paper 1.20.x 或 1.21.x(
/version)
- 检查您是否正在运行 Java 21+(
java -version)
- 查看服务器控制台中是否有
[ChatModifier] 错误
/global 提示无权限
确保该玩家/组拥有 chatmodifier.command.global 权限。
距离为 0 时聊天无反应
设置 chat.distance: 0 —— 值 0 表示无限范围。
自定义别名无效
请确保已重启服务器(而非仅执行 /reload)。额外别名会在启动时通过 CommandMap 注册。
LuckPerms 前缀未显示
请确保在 ChatModifier 之前安装并加载了 LuckPerms。
? 版本历史
未来路线图
- 更多自定义选项
- 从 API 获取黑名单
- 自定义昵称系统
- 数据库集成
0.1.0
? 链接
? 许可证
MIT License — 可自由修改和分发
NOTE: I generated ONLY this description with AI and I'm open for your ideas!
? ChatModifier
Chat plugin for a school Minecraft server (PaperMC 1.20.x / 1.21.x)
ChatModifier overhauls chat and player communication — it scopes messages to a configurable radius, handles private messages, a staff-only global broadcast, and an admin spy mode. It optionally integrates with LuckPerms to display rank prefixes.
✨ Features
? Local chat with range
- Messages are only visible to players within a configured radius
- Setting
0 = infinite range (entire world)
- Configurable cooldown between messages
- Ignores spectator-mode and vanished players
? Shout (/shout, /s, /krzyk)
- Broadcasts a message to every player on the server
- Long cooldown configurable in config.yml
- Available to all players (no permission required)
? Global (/global, /g)
- Staff broadcast visible to everyone
- Requires the
chatmodifier.command.global permission
- Can be disabled in config.yml
? Private messages (/msg, /reply)
- Send a private message to a specific player
/reply (or /r) replies to the last conversation partner
- Handles vanished / spectator players correctly
- Tab-complete filters hidden players based on permission
?️ Chat spy (/spy)
- Separate toggles for chat spy and private-message spy
- Intercepted messages are prefixed with
[SPY]
- Requires the
chatmodifier.spy permission
? Message filter
- Blocks disallowed characters (configurable regex)
- Banned word list in config.yml
- LuckPerms integration: rank prefixes shown in chat
? Installation
- Download the
.jar from GitHub
- Place it in your server's
plugins/ folder
- Start the server — config files are generated automatically
- Edit
plugins/ChatModifier/config.yml and lang.yml
- Reload with
/reload confirm or restart the server
Requirements:
- PaperMC 1.20.x or 1.21.x
- Java 21+
- LuckPerms (optional — for rank prefix display)
? Commands
| Command |
Aliases |
Description |
Permission |
/shout <message> |
/s, /krzyk |
Broadcast to the whole server (cooldown applies) |
(none — everyone) |
/global <message> |
/g |
Staff broadcast |
chatmodifier.command.global |
/msg <player> <message> |
/tell, /w, /message |
Private message |
(none — everyone) |
/reply <message> |
/r |
Reply to last private message |
(none — everyone) |
/spy |
— |
Show spy status |
chatmodifier.spy |
/spy chat |
— |
Toggle chat spy |
chatmodifier.spy |
/spy msg |
— |
Toggle private-message spy |
chatmodifier.spy |
? Permissions
| Permission |
Default |
Description |
chatmodifier.command.global |
false |
Access to /global |
chatmodifier.cooldown.bypass |
false |
Skip chat cooldown |
chatmodifier.spy |
op |
Access to /spy |
chatmodifier.seehidden |
false |
See hidden/vanished players in /msg tab-complete |
LuckPerms example
/lp group admin permission set chatmodifier.command.global true
/lp group admin permission set chatmodifier.spy true
/lp group vip permission set chatmodifier.cooldown.bypass true
⚙️ Configuration
config.yml
# ------- [ CHAT ] ------- #
chat:
distance: 32 # Message radius in blocks (0 = infinite)
cooldown: 1500 # Time between messages in milliseconds
# ------- [ BANNED WORDS ] ------- #
banned-words: []
# Example: ["badword", "spam"]
# ------- [ GLOBAL ] ------- #
global:
enabled: true
# ------- [ SHOUT ] ------- #
shout:
enabled: true
cooldown: 150000 # Cooldown in milliseconds (default 2.5 minutes)
# ------- [ COMMANDS ] ------- #
# Extra aliases registered at startup (beyond the built-in ones).
# Restart the server after changing these values.
# Built-in: shout=[krzyk, s] global=[g] msg=[tell, w, message] reply=[r]
commands:
shout:
extra-aliases: []
global:
extra-aliases: []
msg:
extra-aliases: []
reply:
extra-aliases: []
spy:
extra-aliases: []
Chat radius reference
distance value |
Effect |
0 |
Infinite (entire world) |
32 |
Visible within 32 blocks |
64 |
Visible within 64 blocks |
Shout cooldown reference
shout.cooldown value |
Duration |
60000 |
1 minute |
150000 |
2.5 minutes |
300000 |
5 minutes |
900000 |
15 minutes |
lang.yml
All player-facing messages live in plugins/ChatModifier/lang.yml. Edit any value to customise the text. Color codes use & (e.g. &c = red, &a = green, &7 = gray). Placeholders are documented inside the file.
chat:
no-recipients: "&c[CM] Nobody heard you - No players within {distance} blocks!"
shout:
cooldown: "&c[CM] You must wait {minutes}min. {seconds}s. before using this command again."
Adding custom command aliases
To add a custom alias (e.g. /bc as an alias for /shout), edit config.yml and restart:
commands:
shout:
extra-aliases: [ bc, broadcast ]
? LuckPerms integration
When LuckPerms is installed, the plugin automatically fetches each player's prefix and prepends it to chat messages:
[Admin] Dominik: Hello!
Without LuckPerms only the player name is shown:
Dominik: Hello!
? Version history
1.0.0
- Initial release
- Local chat with radius and cooldown
- Commands:
/shout, /global, /msg, /reply, /spy
- Configurable extra aliases per command in config.yml
- LuckPerms integration
- Support for Minecraft 1.20.x and 1.21.x
? Troubleshooting
Plugin won't load
- Check the server version — Paper 1.20.x or 1.21.x is required (
/version)
- Check that you are running Java 21+ (
java -version)
- Look for
[ChatModifier] errors in the server console
/global says no permission
Make sure the player / group has chatmodifier.command.global.
Chat does nothing at distance 0
Set chat.distance: 0 — the value 0 means infinite range.
Custom alias doesn't work
Make sure you restarted the server (not just /reload). Extra aliases are registered via CommandMap at startup.
LuckPerms prefix is not shown
Ensure LuckPerms is installed and loaded before ChatModifier.
? Version History
Future Roadmap
- More customization
- Getting black list from API
- Custom nick system
- Database integration
0.1.0
- Initial release with core functionality.
? Links
- GitHub:
- Modrinth:
- Issues:
? License
MIT License — Free to modify and distribute
评论 0
登录后参与评分
还没有评论,来抢沙发吧