VanillaPoints
VanillaPoints 是一款轻量级的 Paper 插件,适用于私人生存服务器。它允许玩家保存并查看出生点、家坐标和传送点坐标,但不提供传送功能,从而保留原版风格的导航体验。
要求
- Paper API 1.21+
- Java 21+
- Maven(用于从源代码构建)
功能
- 无传送功能,仅显示坐标。
- 点击显示的坐标可将其复制到剪贴板。
- 使用
data.yml 进行 YAML 存储。
- 支持可选的 SQLite 和 MySQL 存储后端。
- 命令/API 变更采用异步持久化队列。
- 使用
data.yml.tmp 和 data.yml.bak 实现更安全的保存机制。
- 提供公开的 Bukkit
ServicesManager API 以及可取消的点事件。
- 消息内容可配置,内置英文和俄文翻译。
- 复制格式可配置。
- 加载已保存的坐标时进行数据验证。
- 管理员重载命令。
命令
| 命令 |
描述 |
权限 |
/spawn |
显示出生点坐标。 |
无 |
/setspawn |
将当前位置保存为出生点。 |
vanillapoints.setspawn |
/home |
显示你的家坐标。 |
无 |
/sethome |
将当前位置保存为你的家。 |
无 |
/warp [name] |
列出所有传送点(不指定名称),或显示特定传送点的坐标。 |
无 |
/warps |
列出可用的传送点。 |
无 |
/setwarp <name> |
将当前位置保存为传送点。 |
vanillapoints.setwarp |
/delwarp <name> |
删除一个传送点。 |
vanillapoints.delwarp |
/vp reload |
重载配置文件、消息和数据。 |
vanillapoints.reload |
传送点名称只能包含拉丁字母、数字、下划线和连字符,长度最多为 32 个字符。
配置
config.yml:
settings:
language: en
save-immediately: true
normalize-to-block: true
copy-format: '{x} {y} {z}'
storage:
backend: yaml # yaml | sqlite | mysql
migrate-yaml-on-first-run: true
sqlite:
file: storage.db
mysql:
host: localhost
port: 3306
database: vanillapoints
username: root
password: ''
pool-size: 8
use-ssl: true
可用的内置语言:
en 使用 messages.yml。
ru 使用 messages_ru.yml。
copy-format 支持 {x}、{y}、{z}、{world} 和 {warp}(视情况适用)。
settings.save-immediately 会在坐标变更后将写入操作排入异步队列。当禁用此选项时,待处理的数据将在执行 /vp reload 和插件关闭时刷新。
storage.backend 默认设置为 yaml 以保证兼容性。切换到 sqlite 或 mysql 后,坐标数据会缓存在内存中以加快命令响应速度,并以异步方式持久化快照。如果启用了 storage.migrate-yaml-on-first-run 且所选的 SQL 后端为空,则现有的 data.yml 中的坐标将被导入一次,而 YAML 文件将保留作为备份。
公开 API
其他插件可以通过 Bukkit 服务访问 VanillaPoints:
RegisteredServiceProvider<VanillaPointsAPI> provider = Bukkit.getServicesManager()
.getRegistration(VanillaPointsAPI.class);
VanillaPointsAPI api = provider == null ? null : provider.getProvider();
公开 API 包位于 dev.vaniley.vanillapoints.api。修改方法和返回 Location 的方法必须在服务器主线程上调用。修改方法会触发来自 dev.vaniley.vanillapoints.api.event 的可取消 Bukkit 事件;PointInfo 方法返回不可变的 DTO 以实现更安全的读取。
安装
- 构建或下载插件
.jar 文件。
- 将其放入服务器的
plugins 文件夹中。
- 重启服务器。
- 根据需要编辑
plugins/VanillaPoints/config.yml 和 messages*.yml。
- 在配置文件或消息更改后,使用
/vp reload 进行重载。
VanillaPoints
VanillaPoints is a lightweight Paper plugin for private survival servers. It lets players save and view coordinates for spawn, homes and warps without teleportation, preserving vanilla-style navigation.
Requirements
- Paper API 1.21+
- Java 21+
- Maven for building from source
Features
- No teleportation, only coordinate display.
- Click displayed coordinates to copy them to clipboard.
- YAML storage in
data.yml.
- Optional SQLite and MySQL storage backends.
- Async persistence queue for command/API mutations.
- Safer data saves using
data.yml.tmp and data.yml.bak.
- Public Bukkit
ServicesManager API and cancellable point events.
- Configurable messages with bundled English and Russian translations.
- Configurable copy format.
- Data validation when loading saved points.
- Admin reload command.
Commands
| Command |
Description |
Permission |
/spawn |
Show spawn coordinates. |
none |
/setspawn |
Save the spawn point at your current location. |
vanillapoints.setspawn |
/home |
Show your home coordinates. |
none |
/sethome |
Save your home at your current location. |
none |
/warp [name] |
List warps without a name, or show coordinates for one warp. |
none |
/warps |
List available warps. |
none |
/setwarp <name> |
Save a warp at your current location. |
vanillapoints.setwarp |
/delwarp <name> |
Delete a warp. |
vanillapoints.delwarp |
/vp reload |
Reload config, messages and data. |
vanillapoints.reload |
Warp names may contain only Latin letters, numbers, underscores and hyphens, up to 32 characters.
Configuration
config.yml:
settings:
language: en
save-immediately: true
normalize-to-block: true
copy-format: '{x} {y} {z}'
storage:
backend: yaml # yaml | sqlite | mysql
migrate-yaml-on-first-run: true
sqlite:
file: storage.db
mysql:
host: localhost
port: 3306
database: vanillapoints
username: root
password: ''
pool-size: 8
use-ssl: true
Available bundled languages:
en uses messages.yml.
ru uses messages_ru.yml.
copy-format supports {x}, {y}, {z}, {world} and {warp} where applicable.
settings.save-immediately queues writes asynchronously after point changes. When disabled, pending data is flushed during /vp reload and plugin shutdown.
storage.backend defaults to yaml for compatibility. Switching to sqlite or mysql keeps point data cached in memory for fast commands and persists snapshots asynchronously. If storage.migrate-yaml-on-first-run is enabled and the selected SQL backend is empty, existing data.yml points are imported once and the YAML file is left in place as a backup.
Public API
Other plugins can access VanillaPoints through Bukkit services:
RegisteredServiceProvider<VanillaPointsAPI> provider = Bukkit.getServicesManager()
.getRegistration(VanillaPointsAPI.class);
VanillaPointsAPI api = provider == null ? null : provider.getProvider();
The public API package is dev.vaniley.vanillapoints.api. Mutation methods and Location-returning methods must be called on the server main thread. Mutation methods fire cancellable Bukkit events from dev.vaniley.vanillapoints.api.event; PointInfo methods return immutable DTOs for safer reads.
Installation
- Build or download the plugin
.jar.
- Place it in the server
plugins folder.
- Restart the server.
- Edit
plugins/VanillaPoints/config.yml and messages*.yml if needed.
- Use
/vp reload after config/message changes.
评论 0
登录后参与评分
还没有评论,来抢沙发吧