BeeTools
一套用于运行在 Paper 上的 Minecraft 服务器的服务端实用工具。目前实现了出生点管理模块。
功能特性
/setspawn — 将出生点设置为玩家当前位置(包括朝向),并记录设置者及时间。
/spawn — 将玩家传送至已保存的出生点。
/spawninfo — 打开一个显示出生点信息的窗口:世界、坐标、指南针方向、设置者、设置日期,以及该位置是否可通行。
- 玩家首次加入服务器时自动传送至出生点。
- 安全检查:仅当脚部方块和头部方块均可通行时才执行传送。
- 出生点数据保存在
plugins/BeeTools/spawn.json 中,重启服务器后不会丢失。
- 支持两种语言:俄语和英语,根据玩家的客户端语言自动选择。
命令与权限
| 命令 |
权限节点 |
默认值 |
描述 |
/setspawn |
beetools.setspawn |
op |
设置出生点 |
/spawn |
beetools.spawn |
true |
传送至出生点 |
/spawninfo |
beetools.spawninfo |
op |
查看出生点信息 |
权限节点在 plugin.yml 中声明,因此 LuckPerms 及其他权限管理器可以正确识别它们。
beetools.spawninfo 被声明为 beetools.setspawn 的子权限:拥有移动出生点权限的玩家自动也拥有查看权限 —— 无需单独授予。
语言设置
语言设置在 plugins/BeeTools/config.yml 中配置:
language: auto
| 值 |
作用 |
auto(默认) |
跟随玩家的客户端语言:俄语客户端显示俄语,其他所有情况显示英语 |
ru |
始终显示俄语,无论客户端语言如何 |
en |
始终显示英语,无论客户端语言如何 |
文本文件位于 plugins/BeeTools/lang/ru.yml 和 lang/en.yml。这些文件在首次启动时创建,可根据你的服务器需求进行编辑——插件更新不会覆盖这些文件。如果文件损坏,插件会回退到 jar 包内嵌的版本,并在控制台中报告此情况。
这两种语言使用不同的数字复数规则(plural-rule: slavic vs simple)和不同的日期格式,因此 "21 минуту назад" 和 29.08.2026 23:33 会与 "21 minutes ago" 和 2026-08-29 20:33 并存。
plugin.yml 中的命令描述和权限拒绝消息无法本地化——Bukkit 会为整个服务器读取一次清单——因此它们是双语显示的。
兼容性
|
|
| 平台 |
Paper(及其分支如 Purpur) |
| Minecraft 版本 |
1.21 – 1.21.11 |
| Java |
21+ |
该插件仅使用 Bukkit API,因此在 Spigot 上很可能也能正常工作,但尚未在此平台上进行测试。不支持 Folia —— 传送操作是同步执行的。
安装
- 从 Releases 页面或 Modrinth 下载
beetools-<version>.jar。
- 将文件放入服务器的
plugins/ 文件夹。
- 重启服务器。
- 站在你希望设为出生点的位置,运行
/setspawn。
从源码构建
mvn clean package
生成的 jar 包位于 target/beetools-<version>.jar。测试(JUnit 5 + Mockito)作为构建过程的一部分运行;若要单独运行测试,请使用 mvn test。
Gson 被打包进 jar 包,并通过 maven-shade-plugin 重定位到 net.romuskras.beeTools.libs.gson 命名空间,以避免与服务器上其他插件使用的 Gson 版本发生冲突。
数据存储
出生点数据存储在 plugins/BeeTools/spawn.json 中:
{
"location": {"world": "world", "x": -71.42, "y": 63.0, "z": -59.44, "yaw": 0.18, "pitch": 4.08},
"setBy": {"uuid": "68c83735-d060-3355-9d07-82b5c0bac139", "name": "_Romus_"},
"setAt": "2026-08-29T20:33:00Z"
}
世界通过名称引用:如果在加载时未找到同名世界,则不应用出生点数据,并在控制台中写入错误日志。
1.1.0 之前的版本中的文件——没有 location 包装层的裸位置数据——会被原样读取,并在第一次保存时转换为新格式。此类出生点的设置者将显示为未知,窗口中也会相应提示。
如果设置者未知,则不写入 setBy 块;如果日期未知,则省略 setAt。损坏的 uuid 或日期不会导致读取其余内容失败:插件会记录警告并将该字段留空。
许可证
MIT
BeeTools
A set of server-side utilities for a Minecraft server running Paper. Currently the spawn point management module is implemented.
Features
/setspawn — sets the spawn point to the player's current position (including facing direction) and records who set it and when.
/spawn — teleports the player to the saved point.
/spawninfo — opens a window with information about the point: world, coordinates, compass direction, author, date it was set, and whether the spot is passable.
- Automatic teleport to spawn on a player's first join.
- Safety check: the teleport only happens if both the block at foot level and the block at head level are passable.
- The point is stored in
plugins/BeeTools/spawn.json and survives a server restart.
- Two languages: Russian and English, selected by the player's client language.
Commands and permissions
| Command |
Permission |
Default |
Description |
/setspawn |
beetools.setspawn |
op |
Set the spawn point |
/spawn |
beetools.spawn |
true |
Teleport to spawn |
/spawninfo |
beetools.spawninfo |
op |
View information about the spawn point |
Permissions are declared in plugin.yml, so LuckPerms and other permission managers pick them up correctly.
beetools.spawninfo is declared as a child of beetools.setspawn: whoever can move the spawn can automatically view it too — there is no need to grant the permission separately.
Language
The language is set in plugins/BeeTools/config.yml:
language: auto
| Value |
What it does |
auto (default) |
Follows the player's client language: a Russian client gets Russian, everyone else gets English |
ru |
Always Russian, regardless of the client |
en |
Always English, regardless of the client |
The texts live in plugins/BeeTools/lang/ru.yml and lang/en.yml. The files are created on first startup and can be edited to suit your server — a plugin update does not overwrite them. If a file turns out to be corrupted, the plugin falls back to the version bundled in the jar and reports it in the console.
The two languages have different numeral pluralization rules (plural-rule: slavic vs simple) and different date formats, which is why "21 минуту назад" and 29.08.2026 23:33 sit alongside "21 minutes ago" and 2026-08-29 20:33.
Command descriptions and permission-denied messages in plugin.yml cannot be localized — Bukkit reads the manifest once for the whole server — so they are bilingual.
Compatibility
|
|
| Platform |
Paper (and forks — Purpur) |
| Minecraft version |
1.21 – 1.21.11 |
| Java |
21+ |
The plugin uses only the Bukkit API, so it very likely works on Spigot as well, but it has not been tested there. Folia is not supported — teleportation is performed synchronously.
Installation
- Download
beetools-<version>.jar from the Releases page or from Modrinth.
- Put the file into your server's
plugins/ folder.
- Restart the server.
- Stand where you want the spawn to be and run
/setspawn.
Building from source
mvn clean package
The resulting jar appears at target/beetools-<version>.jar. Tests (JUnit 5 + Mockito) run as part of the build; to run them separately, use mvn test.
Gson is bundled into the jar and relocated to the net.romuskras.beeTools.libs.gson namespace (maven-shade-plugin) so it does not conflict with Gson versions from other plugins on the same server.
Data storage
The spawn point is stored in plugins/BeeTools/spawn.json:
{
"location": {"world": "world", "x": -71.42, "y": 63.0, "z": -59.44, "yaw": 0.18, "pitch": 4.08},
"setBy": {"uuid": "68c83735-d060-3355-9d07-82b5c0bac139", "name": "_Romus_"},
"setAt": "2026-08-29T20:33:00Z"
}
The world is referenced by name: if no world with that name is found at load time, the spawn point is not applied and an error is written to the console.
Files from versions prior to 1.1.0 — a bare location without the location wrapper — are read as-is and converted to the new format on the first save. The author of such points remains unknown, and the window says so.
The setBy block is not written if the author is unknown, and setAt is omitted if the date is unknown. A corrupted uuid or date does not break reading the rest: the plugin logs a warning and leaves the field empty.
License
MIT
评论 0
登录后参与评分
还没有评论,来抢沙发吧