GreetCraft
一款轻量级且完全可配置的 Paper 插件,通过 MiniMessage 提供丰富格式的加入消息来欢迎玩家。
功能
- MiniMessage 支持 — 通过 MiniMessage 标准实现渐变、十六进制颜色、装饰等更多效果
- 广播消息 — 可选择将玩家加入服务器的消息广播给整个服务器
- 占位符系统 — 注入玩家名称、世界、在线人数及其他动态数值
- 热重载 — 通过
/greetcraft reload 应用配置更改而无需重启服务器
- 优雅回退 — 在无法使用 MiniMessage 的 Spigot/Bukkit 上自动使用传统格式代码
- 细粒度权限控制 — 按功能级别控制访问权限
- 极小资源占用 — 设计为对服务器性能影响微乎其微
- 现代 API 使用 — 基于 Paper 最新 API 构建
要求
| 要求 |
最低版本 |
| Java |
17 |
| Minecraft |
1.20 |
| 服务端软件 |
Paper 1.20+(详见 兼容性) |
安装
- 从 Modrinth 下载最新版本。
- 将
.jar 文件放入服务端的 plugins/ 目录中。
- 重启服务器。在生产环境中避免使用
/reload confirm。
- 根据需要编辑
plugins/GreetCraft/config.yml。
- 运行
/greetcraft reload 以应用更改而无需重启。
配置
配置文件会在首次运行时自动生成于 plugins/GreetCraft/config.yml。
# 启用 MiniMessage 格式化。
# 设置为 false 则以使用传统的 (&) 格式代码代替。
use-minimessage: true
# 发送给加入玩家的私人消息。
welcome-message: '<gold><bold>欢迎来到服务器,%player%!</bold></gold>'
# 当有人加入时是否向所有在线玩家广播消息。
broadcast-join: true
# 玩家加入时向所有玩家广播的消息。
broadcast-message: '<yellow>%player%</yellow> <gray>加入了服务器 (<white>%online%</white> 在线)。</gray>'
# 设置为 true 以屏蔽默认的 "Player joined the game" 消息。
override-join-message: false
占位符
以下占位符可在 config.yml 的任何消息字段中使用。
| 占位符 |
描述 |
%player% |
加入玩家的用户名 |
%displayname% |
加入玩家的显示名称 |
%world% |
玩家加入的世界名称 |
%online% |
当前在线玩家数量 |
MiniMessage 格式化
当设置 use-minimessage: true 时,您可以在消息中使用完整的 MiniMessage 标签语法。
# 颜色渐变
welcome-message: '<gradient:gold:yellow>欢迎,%player%!</gradient>'
# 彩虹文本
welcome-message: '<rainbow>欢迎,%player%!</rainbow>'
# 十六进制颜色
welcome-message: '<#00ff00>欢迎,%player%!</#00ff00>'
# 组合标签
welcome-message: '<gradient:red:blue><bold>欢迎</bold></gradient> <aqua>%player%</aqua>!'
有关可用标签的完整参考,请参阅 MiniMessage 文档。
命令
| 命令 |
描述 |
权限节点 |
/greetcraft |
显示插件版本和信息 |
greetcraft.use |
/greetcraft reload |
在不重启的情况下重新加载 config.yml |
greetcraft.reload |
别名: /gc, /greet
权限
| 节点 |
描述 |
默认值 |
greetcraft.use |
访问 /greetcraft 命令 |
true |
greetcraft.reload |
访问 /greetcraft reload |
op |
greetcraft.* |
授予所有 GreetCraft 权限 |
op |
兼容性
| 平台 |
支持级别 |
| Paper |
完全支持(推荐) |
| Purpur |
完全支持 |
| Folia |
完全支持 |
MiniMessage 格式化需要 Paper 或基于 Paper 的分叉版。在 Spigot 和 Bukkit 上,插件会自动回退到标准的基于 & 的格式代码。
贡献
欢迎提交错误报告和功能请求。
报告错误时,请包含您的服务端软件、版本以及控制台中的相关错误输出的完整副本。
许可
本项目根据 MIT 许可证 发布。
GreetCraft
A lightweight, fully configurable Paper plugin that welcomes players with rich, formatted join messages powered by MiniMessage.
Features
- MiniMessage support — Gradients, hex colours, decorations, and more via the MiniMessage standard
- Broadcast messages — Optionally announce joins to the entire server
- Placeholder system — Inject player name, world, online count, and other dynamic values
- Live reload — Apply config changes without restarting via
/greetcraft reload
- Graceful fallback — Automatically uses legacy formatting on Spigot/Bukkit where MiniMessage is unavailable
- Fine-grained permissions — Control access at a per-feature level
- Minimal footprint — Designed to have negligible impact on server performance
- Modern API usage — Built against Paper's latest APIs
Requirements
| Requirement |
Minimum |
| Java |
17 |
| Minecraft |
1.20 |
| Server software |
Paper 1.20+ (see Compatibility) |
Installation
- Download the latest release from Modrinth.
- Place the
.jar file into your server's plugins/ directory.
- Restart the server. Avoid using
/reload confirm in production environments.
- Edit
plugins/GreetCraft/config.yml to your liking.
- Run
/greetcraft reload to apply changes without a restart.
Configuration
The configuration file is generated automatically at plugins/GreetCraft/config.yml on first run.
# Enable MiniMessage formatting.
# Set to false to use legacy (&) formatting codes instead.
use-minimessage: true
# Message sent privately to the joining player.
welcome-message: '<gold><bold>Welcome to the server, %player%!</bold></gold>'
# Whether to broadcast a message to all online players when someone joins.
broadcast-join: true
# Message broadcast to all players on join.
broadcast-message: '<yellow>%player%</yellow> <gray>joined the server (<white>%online%</white> online).</gray>'
# Set to true to suppress the default "Player joined the game" message.
override-join-message: false
Placeholders
These placeholders can be used in any message field within config.yml.
| Placeholder |
Description |
%player% |
The joining player's username |
%displayname% |
The joining player's display name |
%world% |
The name of the world the player joined in |
%online% |
The current number of online players |
MiniMessage Formatting
When use-minimessage: true is set, you can use the full MiniMessage tag syntax in your messages.
# Colour gradient
welcome-message: '<gradient:gold:yellow>Welcome, %player%!</gradient>'
# Rainbow text
welcome-message: '<rainbow>Welcome, %player%!</rainbow>'
# Hex colour
welcome-message: '<#00ff00>Welcome, %player%!</#00ff00>'
# Combined tags
welcome-message: '<gradient:red:blue><bold>Welcome</bold></gradient> <aqua>%player%</aqua>!'
For a full reference of available tags, see the MiniMessage Documentation.
Commands
| Command |
Description |
Permission |
/greetcraft |
Displays plugin version and information |
greetcraft.use |
/greetcraft reload |
Reloads config.yml without a restart |
greetcraft.reload |
Aliases: /gc, /greet
Permissions
| Node |
Description |
Default |
greetcraft.use |
Access to the /greetcraft command |
true |
greetcraft.reload |
Access to /greetcraft reload |
op |
greetcraft.* |
Grants all GreetCraft permissions |
op |
Compatibility
| Platform |
Support level |
| Paper |
Full support (recommended) |
| Purpur |
Full support |
| Folia |
Full support |
MiniMessage formatting requires Paper or a Paper fork. On Spigot and Bukkit, the plugin automatically falls back to standard &-based formatting codes.
Contributing
Bug reports and feature requests are welcome.
When reporting a bug, please include your server software, version, and a full copy of any relevant error output from the console.
Licence
This project is released under the MIT Licence.
评论 0
登录后参与评分
还没有评论,来抢沙发吧