RiotChat
RiotChat 是一款轻量级、专注于管理功能的 Spigot/Paper 聊天插件。它提供格式化聊天、提及高亮、持久化忽略系统、清除/公告工具、标签页头尾以及基于数据库的持久化静音系统和命令补全功能。
本自述文件记录了功能、安装(二进制/JAR)、配置、数据库、命令、权限以及如何报告问题。
功能
- 支持前缀/后缀的格式化聊天(LuckPerms 集成)
- 提及高亮与处理
- 私聊(
/msg、/reply)
- 持久化忽略系统(基于数据库)
- 可选项带公告和声音的聊天清除功能
- 使用 MiniMessage 模板进行全服公告
- 标签页头/尾部支持
- 基于数据库存储的持久化静音系统:
/mute <player> [duration] [reason]
/unmute <player>
- 静音记录存储在
riotchat_mutes 表中
/mute 命令的玩家名称和持续时间自动补全
- 由配置文件驱动行为,支持 H2/MySQL
安装(JAR / 发布仓库)
此仓库旨在托管插件发布版本(JAR 文件),不一定包含源代码。要在你的服务器上安装该插件:
- 从此仓库的 Releases 页面或 Modrinth、SpigotMC、Hangar 下载发布的 JAR 文件。
- 将 JAR 文件复制到 Paper/Spigot 服务器的
plugins/ 目录中。
- 启动或重启服务器。插件将在首次运行时生成默认配置文件。
如果仓库中没有编译好的 JAR 文件,请查看 Releases 标签页或项目网站以获取二进制下载链接。
配置
主配置文件(首次运行时生成):插件文件夹中的 config.yml。重要配置键(示例):
enable-chat (boolean) — 聊天功能的总开关。
chat.separator (string) — 玩家名称与消息之间的分隔符。
chat.name-hover / chat.name-click (boolean) — 启用玩家名称上的悬停/点击行为。
clearchat.lines (int) — /clearchat 发送的空行数。
announce.format (MiniMessage 块) — 用于广播公告的模板。
database.type — H2 或 MYSQL。
database.h2.file — H2 文件路径(不含 .mv.db 后缀)。
database.mysql.* — MySQL 连接设置。
示例片段:
database:
type: "H2"
h2:
file: "plugins/RiotChat/riotchat"
clearchat:
lines: 120
message: |
<dark_gray>━━━━━━━━━━━━━━━━━━━━━━━━</dark_gray>
<gradient:#00ffff:#00bcd4><bold>CHAT CLEARED</bold></gradient>
<gray>The chat has been cleared by <b><cyan>%player_name%</cyan></b></gray>
<dark_gray>━━━━━━━━━━━━━━━━━━━━━━━━</dark_gray>
命令
/msg <player> <message> — 发送私聊消息。
/reply <message> — 回复上一条私聊消息。
/announce <message> — 广播公告(权限:riotchat.announce)。
/clearchat [silent] — 清除聊天;silent 参数可抑制广播(权限:riotchat.clearchat)。
/togglechat — 切换全局聊天状态(权限:riotchat.chat.toggle)。
/ignore <player> — 切换对某玩家的忽略状态(权限:riotchat.ignore)。
/ignorelist — 显示你当前忽略的玩家列表。
/mute <player> [duration] [reason] — 静音某玩家(权限:riotchat.mute)。
- 持续时间示例:
10s、5m、1h、1d 或 perm(永久)。
- 插件提供了
MuteTabCompleter,可建议玩家名称和常用持续时间。
/unmute <player> — 解除某玩家的静音状态(权限:riotchat.unmute)。
权限
建议的默认权限节点(请在你的权限系统中进行调整):
riotchat.color — 在聊天中使用颜色代码(默认:op)
riotchat.reload — 重新加载配置(默认:op)
riotchat.announce — 使用 /announce 命令(默认:op)
riotchat.ignore — 使用忽略相关命令(默认:op)
riotchat.clearchat — 清除聊天(默认:op)
riotchat.clearchat.bypass — 绕过清除聊天的效果(默认:false)
riotchat.chat.bypass — 绕过全局聊天禁用状态(默认:op)
riotchat.chat.toggle — 开启/关闭聊天(默认:op)
riotchat.mute — 静音玩家(默认:op)
riotchat.unmute — 解除玩家静音(默认:op)
riotchat.mute.bypass — 绕过静音限制(供工作人员使用)(默认:op)
故障排除
- 数据库连接错误:请检查
config.yml 中的数据库设置及其可达性。
如果需要进一步帮助,请在仓库中提交 Issue,并附上服务器日志和配置片段。
贡献与源码
此仓库旨在托管插件发布版本(二进制 JAR 文件)。其中可能不包含插件源代码。如果你想贡献代码或请求源码,请提交 Issue 或查看项目页面以获取源码仓库链接。不接受针对已编译发布版仓库的拉取请求(Pull Request)。
许可证
本项目默认采用 MIT 许可证授权。
更新日志(简要)
- v0.1 — 核心聊天格式化、忽略、消息传递、公告、清除聊天、标签页功能
- v0.2 — 持久化静音系统、
/mute//unmute 命令、MuteTabCompleter
RiotChat
RiotChat is a lightweight, moderation-focused chat plugin for Spigot/Paper. It provides formatted chat, mentions, a persistent ignore system, clear/announce utilities, tablist headers/footers, and a persistent mute system with database backing and tab-completion for moderation commands.
This README documents features, installation (binary/JAR), configuration, database, commands, permissions and how to report issues.
Features
- Formatted chat with prefix/suffix support (LuckPerms integration)
- Mentions highlighting and processing
- Private messages (
/msg, /reply)
- Persistent ignore system (database-backed)
- Clear chat with optional announcement and sound
- Server-wide announcements using MiniMessage templates
- Tablist header/footer support
- Persistent mute system with DB storage:
/mute <player> [duration] [reason]
/unmute <player>
- Mutes stored in
riotchat_mutes table
- Tab-completion for
/mute (player names + durations)
- Config-driven behavior and H2/MySQL support
Installation (JAR / release repository)
This repository is intended to host the plugin releases (JAR files) and does not necessarily include the source code. To install the plugin on your server:
- Download the release JAR from this repository's Releases page or Modrinth, SpigotMC, Hangar.
- Copy the JAR file into your Paper/Spigot server's
plugins/ directory.
- Start or restart the server. The plugin will generate default configuration files on first run.
If a compiled JAR is not present in the repository, check the Releases tab or the project's website for binary downloads.
Configuration
Main config file (generated on first run): config.yml in the plugin folder. Important config keys (examples):
enable-chat (boolean) — Global switch for chat features.
chat.separator (string) — Separator between name and message.
chat.name-hover / chat.name-click (boolean) — Enable hover/click behaviour on player names.
clearchat.lines (int) — Number of blank lines to send for /clearchat.
announce.format (MiniMessage block) — Template used for broadcast announcements.
database.type — H2 or MYSQL.
database.h2.file — H2 file path (without .mv.db).
database.mysql.* — MySQL connection settings.
Example excerpt:
database:
type: "H2"
h2:
file: "plugins/RiotChat/riotchat"
clearchat:
lines: 120
message: |
<dark_gray>━━━━━━━━━━━━━━━━━━━━━━━━</dark_gray>
<gradient:#00ffff:#00bcd4><bold>CHAT CLEARED</bold></gradient>
<gray>The chat has been cleared by <b><cyan>%player_name%</cyan></b></gray>
<dark_gray>━━━━━━━━━━━━━━━━━━━━━━━━</dark_gray>
Commands
/msg <player> <message> — Send a private message.
/reply <message> — Reply to last private message.
/announce <message> — Broadcast an announcement (permission: riotchat.announce).
/clearchat [silent] — Clears chat; silent suppresses broadcast (permission: riotchat.clearchat).
/togglechat — Toggle global chat state (permission: riotchat.chat.toggle).
/ignore <player> — Toggle ignoring a player (permission: riotchat.ignore).
/ignorelist — Show the players you currently ignore.
/mute <player> [duration] [reason] — Mute a player (permission: riotchat.mute).
- Duration examples:
10s, 5m, 1h, 1d, or perm for permanent.
- The plugin provides a
MuteTabCompleter that suggests players and common durations.
/unmute <player> — Unmute a player (permission: riotchat.unmute).
Permissions
Suggested default permission nodes (adjust in your permissions system):
riotchat.color — Use color codes in chat (default: op)
riotchat.reload — Reload configuration (default: op)
riotchat.announce — Use /announce (default: op)
riotchat.ignore — Use ignore commands (default: op)
riotchat.clearchat — Clear chat (default: op)
riotchat.clearchat.bypass — Bypass clear chat effects (default: false)
riotchat.chat.bypass — Bypass global chat-disabled state (default: op)
riotchat.chat.toggle — Toggle chat on/off (default: op)
riotchat.mute — Mute players (default: op)
riotchat.unmute — Unmute players (default: op)
riotchat.mute.bypass — Bypass mutes (for staff) (default: op)
Troubleshooting
- DB connection errors: verify your
config.yml database settings and reachability.
If you need further help, open an issue on the repository with server logs and configuration excerpts.
Contributing & Source
This repository is intended to host plugin releases (binary JARs). It may not contain the plugin source code. If you want to contribute or request the source, please open an issue or check the project page for a link to the source repository. Pull requests against compiled-release repositories are not accepted.
License
This project is provided under the MIT License by default.
Changelog (short)
- v0.1 — Core chat formatting, ignore, messaging, announce, clear-chat, tablist
- v0.2 — Persistent mute system,
/mute//unmute, MuteTabCompleter
评论 0
登录后参与评分
还没有评论,来抢沙发吧