DuskChat
DuskChat 是一款适用于 Paper 和 Folia 服务器的可配置聊天插件。它负责处理聊天格式化、提及(Mentions)、私聊、管理工具、玩家信息以及交互式物品或背包预览,且无需玩家在客户端安装任何内容。
公共聊天不会等待数据库响应。玩家偏好设置会由独立工作线程保存至 SQLite,而玩家和背包操作则使用正确的 Paper 或 Folia 调度器。
聊天格式化
根据需要创建任意数量的聊天格式,并通过权限和优先级进行分配。格式支持:
- 旧版颜色与装饰代码
- Hex 色值
- 支持的 MiniMessage 标签
- PlaceholderAPI 占位符值
- LuckPerms 前缀、后缀及主组别
玩家名称可显示可配置的悬浮提示,包含其头衔、击杀数、死亡数、延迟、游戏时长以及你添加的任何 PlaceholderAPI 值。点击名称可以建议或执行私聊指令。
提及
玩家可以输入精确的玩家名称来提及某人。是否强制要求 @Name 是可选的。
提及高亮、音效、动作栏和聊天通知均可单独配置。当启用忽略玩家选项时,提及也会尊重被忽略的玩家。
物品与背包预览
玩家可以直接在聊天中分享以下信息:
[item] 展示其手持物品
[inv] 分享其背包快照
[ec] 分享其末影箱快照
背包预览为只读模式。它们会自动过期,具有可配置的缓存限制,并在 DuskChat 重载或禁用时关闭。
私聊与管理员聊天
DuskChat 包含以下功能:
/msg 和 /reply
/ignore
/msgtoggle
/chattoggle
/staffchat
/spy
/chatmute
/chatclear
私聊格式和音效可配置。接收方默认会听到紫水晶铃声,且部分指令可使用自定义音效。
聊天过滤器
每个过滤器都可以通过独立的权限进行启用、禁用或绕过。可用的过滤器包括:
- 重复字符刷屏
- 过度使用大写字母
- 域名和 IPv4 地址
- 自定义 Java 正则表达式
- 重复或高度相似的发言
- 消息长度限制与聊天冷却时间
配置
大多数设置保存在 config.yml 中,而指令和管理员/过滤器的消息存储在 messages.yml 中。
这两个文件都可以在不重启服务器的情况下重新加载。更新后,DuskChat 会自动补充缺失的默认配置项;在迁移旧配置文件之前会创建备份;并包含 /duskchat validate 命令以在控制台中报告配置问题。
依赖项
DuskChat 没有必需的插件依赖。
- PlaceholderAPI: 可选,用于外部占位符
- LuckPerms: 可选,用于原生头衔信息
SQLite 作为运行时库包含在内,因此不需要外部数据库服务器。
兼容性
- 专为 Paper 和 Folia 构建
- 基于 Paper 1.20.3 API 编译
- 使用 Java 17 字节码
- 仅服务端;玩家无需安装任何内容
你的 Paper 或 Folia 版本可能需要更高版本的 Java。
安装
- 将 DuskChat JAR 文件放入服务器的
plugins 文件夹。
- 启动服务器一次以生成配置文件。
- 编辑
plugins/DuskChat/config.yml 和 messages.yml。
- 运行
/duskchat validate,然后运行 /duskchat reload。
对于生产环境的更新,建议在完整重启服务器期间替换 JAR 文件。
许可证
DuskChat 采用 MIT License 授权。
DuskChat
DuskChat is a configurable chat plugin for Paper and Folia servers. It handles chat formatting, mentions, private messages, moderation tools, player information and interactive item or inventory previews without making players install anything on their clients.
Public chat never waits for the database. Player preferences are saved to SQLite on a separate worker, while player and inventory actions use the correct Paper or Folia scheduler.
Chat formatting
Create as many chat formats as you need and assign them through permissions and priorities. Formats support:
- Legacy color and decoration codes
- Hex colors
- Supported MiniMessage tags
- PlaceholderAPI values
- LuckPerms prefixes, suffixes and primary groups
Player names can show a configurable hover with their rank, kills, deaths, ping, playtime and any PlaceholderAPI values you add. Clicking the name can suggest or run a private-message command.
Mentions
Players can mention someone by typing their exact name. Requiring @Name is optional.
Mention highlighting, sounds, actionbars and chat notifications can all be configured separately. Mentions also respect ignored players when that option is enabled.
Item and inventory previews
Players can share information directly in chat with:
[item] to show the item in their hand
[inv] to share a snapshot of their inventory
[ec] to share a snapshot of their ender chest
Inventory previews are read-only. They expire automatically, have a configurable cache limit and close when DuskChat reloads or disables.
Private and staff chat
DuskChat includes:
/msg and /reply
/ignore
/msgtoggle
/chattoggle
/staffchat
/spy
/chatmute
/chatclear
Private-message formats and sounds are configurable. The receiving player hears an amethyst chime by default, and selected commands can use their own sounds.
Chat filters
Each filter can be enabled, disabled or bypassed with a separate permission. Available filters include:
- Repeated-character flooding
- Excessive capital letters
- Domains and IPv4 addresses
- Custom Java regular expressions
- Repeated or closely similar messages
- Message length and chat cooldown
Configuration
Most settings are kept in config.yml, while command and filter messages are stored in messages.yml.
Both files can be reloaded without restarting the server. DuskChat adds missing defaults after an update, creates a backup before migrating older configs and includes /duskchat validate to report configuration problems in the console.
Dependencies
DuskChat has no required plugin dependencies.
- PlaceholderAPI: Optional, used for external placeholders
- LuckPerms: Optional, used for native rank information
SQLite is included as a runtime library, so no external database server is needed.
Compatibility
- Built for Paper and Folia
- Compiled against the Paper 1.20.3 API
- Uses Java 17 bytecode
- Server-side only; players do not need to install anything
Your Paper or Folia build may require a newer Java version.
Installation
- Place the DuskChat JAR in your server's
plugins folder.
- Start the server once to generate the configuration files.
- Edit
plugins/DuskChat/config.yml and messages.yml.
- Run
/duskchat validate, then /duskchat reload.
For production updates, replacing the JAR during a full server restart is recommended.
License
DuskChat is licensed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧