该插件可跨多个 Minecraft 服务器实例同步玩家数据。在 BungeeCord 架构中,当玩家希望在多个服务器实例间无缝切换体验时,这尤其有用。
实现方式是:当玩家断开连接时,将其玩家数据文件(world/playerdata/UUID.dat)复制到一个公共目录。重新连接时,无论连接到同一服务器还是其他服务器,在该服务器的进程尝试读取该文件之前,会先将文件复制到位。简而言之,玩家的数据会随他们一起“移动”。
可以在同一网络中设置多组同步;例如,将所有生存服务器与所有小游戏服务器分开同步。这是通过在配置文件中定义不同的保存目录来实现的。使用相同目录的所有服务器将被归入一个共享池以共享该数据。
有一个显著的例外是玩家的位置信息,这些数据绝不能在不同服务器间共享。因此,位置数据存储在与普通数据分开的文件中。
对于运行 POSIX 兼容系统(如 Linux 及其他类 Unix 系统)的服务器管理员,你可以设置 player-permissions 配置项,以指定玩家数据保存到共享目录时应具备的文件权限。Minecraft 1.20.1 及更早版本会将读取权限授予用户组;此行为已不再适用。此选项允许你恢复旧版行为。除非你清楚自己在做什么,否则请勿使用,否则可能导致同步过程失效!
请注意,每当 Minecraft 协议版本更新(通常是游戏版本更新)时,建议对该插件进行更新。它通常不会直接导致崩溃,但启动时会显示警告信息。
安装
- 下载插件并将其放入你的
plugins/ 目录。
- 启动并停止服务器以生成配置文件。
- 编辑
config.yml 以设置 storage-path,这是一个目录路径。具有相同 storage-path 值的服务器将共享其玩家数据。确保该目录存在且可写!
- 启动服务器。就这样,大功告成!
当前限制
- 所有游戏服务器必须位于同一个文件系统内(不支持多台硬件或独立的 Docker 实例)。
配置
storage-path: 用于存储玩家数据的目录。具有相同 storage-path 值的服务器将共享其玩家数据。如果留空,则不会发生同步。这对于保留 /switch 命令的功能可能很有用。
player-permissions: 应用于已保存的玩家数据的 POSIX 文件权限。格式示例:rw-r--r--。默认为 null,表示不应用任何更改。除非你清楚自己在做什么,否则请勿使用!
命令
/switch: 供有权限的玩家切换服务器使用。必须使用此命令而非 BungeeCord 的 /server,以确保在断开连接注册前正确保存玩家数据。
权限
iosync.switch: 访问服务器切换命令所需的权限。
为什么这个插件可靠?
我将自己开发的所有插件都部署在自己的服务器上,我偏好稳定、可靠且低维护成本的插件。版本升级导致崩溃的情况预期不会出现,但如果真的发生,我会尽快修复。
支持我的工作
如果你喜欢我的作品,我 欢迎赞助! 自 2011 年以来我一直在运营 Minecraft 服务器,为服务器管理员开发了多种插件和工具,目前正逐步发布其中许多作品。你的支持将极大地鼓励我投入更多时间和精力来完善这些项目,并及时修复随着时间的推移可能发现的问题!

This plugin synchronizes a player's data across multiple Minecraft server instances. This is especially useful in a BungeeCord setting, where players want a continuous experience moving between multiple server instances.
This is done by copying a player's data file (world/playerdata/UUID.dat) to a common directory when they disconnect. On reconnection, on the same server or another, the file is copied in place before the server's processes try to read from it. Effectively, the player's data travels with them.
Multiple groups of synchronization on the same network can be done; for example, all survival servers vs all minigame servers. This is possibly by defining different save directories in the config. All of the servers using the same directory will be put in a common pool to share that data.
One notable exception comes from player positions, which must NOT be shared across servers. As such, these are stored separately in data files.
For server owners on POSIX-compatible systems (Linux and others), you can set the player-permissions config value to set the file permissions that the player data should have on saving to the shared directory. Minecraft versions up to 1.20.1 set read permissions to the group; this is no longer the case. This lets you revert this behavior. Don't use unless you know what you're doing, you could break the sync process!
Note that this plugin benefits from an update on each protocol version change (usually game version updates) of Minecraft. It doesn't tend to outright break, but a warning on boot will be shown.
Installation
- Download the plugin and place it in your plugins/ directory.
- Start and stop the server to generate the configuration file.
- Edit config.yml to set
storage-path, which is a directory path. Servers with the same storage-path value will share their player data. Make sure that the directory exists and is writable!
- Start your server. That's it, you're done!
Current limitations
- All game servers must be in the same file system (multiple hardware or separate Docker instances not supported).
Configuration
storage-path: The directory to use to store the players data. Servers with the same storage-path value will share their player data. If left empty, no synchronisation will happen. This can be useful to have the /switch method available.
player-permissions: The POSIX file permissions to apply to the saved player data. Format: rw-r--r--. Defaults to null, applying no changes. Don't use unless you know what you're doing!
Commands
/switch: Used by authorized players to change servers. This has to be used instead of BungeeCord's /server to ensure that the player's data is properly saved before the disconnection registers.
Permissions
iosync.switch: Access to the server switch command.
Why is this plugin reliable?
I use all of my plugins on my own servers, and I like my plugins to be stable, reliable and low maintenance. Breaks on version upgrades are not expected, but should they happen, they will be quickly fixed.
Support my work
If you enjoy my work, I welcome sponsors! I've been running Minecraft servers since 2011, developed several plugins and tools for server owners, and I'm now working my way through releasing many of them. Your support would go a long way toward encouraging me to put more time and effort into this, plus fix any issues that might be discovered over time!

评论 0
登录后参与评分
还没有评论,来抢沙发吧