PlayerSync
PlayerSync 是一款 Minecraft 模组,可跨多个服务器同步你的玩家数据。在服务器网络中无缝切换,无需担心丢失物品栏、经验值、进度或模组道具。
功能特性
- 物品栏同步: 主物品栏、盔甲栏、末影箱和副手物品在所有服务器上始终保持最新状态。
- 经验与属性: 你在服务器间移动时,XP、生命值、饥饿值和分数将被保留。
- 进度同步: 你的成就和进度会跟随你出现在任何地方。
- 药水效果: 加入新服务器时,激活的药水效果会自动恢复。
- 模组支持:
- Curios API:饰品栏槽位和饰品已同步。
- Sophisticated Backpacks:背包内容保持同步。
- Cobblemon:
支持队伍(Party)、电脑(PC)和 Podex(仅限 1.21.1)。
- [Aether, Cosmetic-armor-reworked, Apotheosis, Aether, Refined-storage, Extra-disks 等](仅限 1.21.1)
- [所有使用 NeoForge AttachmentTypes 的模组]
- 占位符物品: 如果某服务器缺少某个模组道具,将生成一个占位符以防止物品丢失。
- 聊天同步(可选): 在服务器之间同步聊天消息(可在配置文件中启用)。
工作原理
PlayerSync 使用中央 MySQL 或 MariaDB 数据库来存储你的玩家数据。当你加入服务器时,数据会从数据库中加载;当你离开或数据保存时,数据库中的记录会更新。这确保了无论你在哪个服务器游玩,你的进度始终处于最新状态。
快速上手
-
安装模组:
下载 PlayerSync 模组并将其放入每个需要同步的服务器的 mods 文件夹中。
-
配置数据库:
首次启动服务器以生成配置文件。编辑 config 文件夹中的 playersync.toml 配置文件,设置你的数据库连接详情。
每个服务器必须拥有唯一的 Server_id。
-
启动服务器:
PlayerSync 将自动创建必要的表并保持数据同步。
-
(可选)启用聊天同步:
如果你希望消息在服务器间共享,请在配置文件中启用聊天同步功能。
配置选项
所有选项均位于服务器 config 文件夹下的 playersync.toml 文件中。
数据库设置
-
host
MySQL/MariaDB 数据库服务器的地址。
默认值: "localhost"
-
db_port
数据库服务器的端口。
默认值: 3306
-
use_ssl
是否对数据库连接使用 SSL。
默认值: false
-
user_name
数据库用户名。
默认值: "playersync"
-
password
数据库密码。
-
db_name
要使用的数据库名称。
默认值: "playersync"
-
Server_id
此值用于区分网络中的各个服务器。每个服务器在此处必须填写唯一的整数!
默认值: 随机生成。
同步选项
- sync_advancements
是否在服务器之间同步进度(成就)。
默认值:
true
序列化选项
- use_legacy_serialization
使用旧的(Base64 之前)序列化格式将数据写入数据库。
仅在读取同一数据库的模组版本低于 1.35 时设置为
true。
默认值: false
占位符物品选项
常见问题
问:如果我持有模组道具并加入没有该模组的服务器会发生什么?
答:PlayerSync 会创建一个占位符物品,这样你的原始道具就不会丢失。当你回到拥有该模组的服务器时,你的道具将会恢复。
问:我的数据安全吗?
答:是的!所有数据都存储在中央数据库中,切换服务器时不会丢失。
问:这适用于单人游戏吗?
答:PlayerSync 专为多服务器网络设计。单人游戏不需要使用它。
问:支持哪些模组?
答:Curios API 和 Sophisticated Backpacks 开箱即用。未来可能会增加更多模组支持。
支持
如有问题或需要帮助,请通过 Github 或 Discord 联系我们。
享受 PlayerSync 带来的全服务器无缝游戏体验!
PlayerSync
PlayerSync is a Minecraft mod that keeps your player data synchronized across multiple servers. Seamlessly move between servers in your network without losing your inventory, experience, advancements, or modded items.
Features
- Inventory Sync: Your main inventory, armor, ender chest, and offhand items are always up to date on every server.
- Experience & Stats: XP, health, food, and score are preserved as you travel between servers.
- Advancement Sync: Your achievements and advancements follow you everywhere.
- Potion Effects: Active potion effects are restored when you join a new server.
- Mod Support:
- Curios API: Curios slots and items are synchronized.
- Sophisticated Backpacks: Backpack contents are kept in sync.
- Cobblemon:
Party, PC and Podex are supported(Only 1.21.1).
- [Aether,Cosmetic-armor-reworked,Apotheosis,Aether,Refined-storage,Extra-disks,etc](Only 1.21.1)
- [Any Mods using NeoForge AttachmentTypes]
- Placeholder Items: If a modded item is missing on a server, a placeholder is created so nothing is lost.
- Chat Sync (Optional): Synchronize chat messages between servers (can be enabled in config).
How It Works
PlayerSync uses a central MySQL or MariaDB database to store your player data. When you join a server, your data is loaded from the database. When you leave or your data is saved, it is updated in the database. This ensures your progress is always up to date, no matter which server you play on.
Getting Started
-
Install the Mod:
Download the PlayerSync mod and place it in the mods folder of each server you want to synchronize.
-
Configure the Database:
Generate config file by starting server at first.Edit the playersync.toml config file in the config folder to set your database connection details.
Each server should have a unique Server_id.
-
Start Your Servers:
PlayerSync will automatically create the necessary tables and keep your data in sync.
-
(Optional) Enable Chat Sync:
Enable chat synchronization in the config if you want messages to be shared between servers.
Configuration Options
All options are found in the playersync.toml file in your server’s config folder.
Database Settings
-
host
The address of your MySQL/MariaDB database server.
Default: "localhost"
-
db_port
The port for your database server.
Default: 3306
-
use_ssl
Whether to use SSL for the database connection.
Default: false
-
user_name
The username for your database.
Default: "playersync"
-
password
The password for your database.
-
db_name
The name of the database to use.
Default: "playersync"
-
Server_id
This value distinguishes each server in your network. Each server must have a unique integer here!
Default: Randomly generated.
Synchronization Options
- sync_advancements
Whether to synchronize advancements (achievements) between servers.
Default:
true
Serialization Options
- use_legacy_serialization
Use the old (pre-Base64) serialization format for writing data to the database.
Set to
true ONLY if you have mod versions older than 1.35 reading the same database.
Default: false
Placeholder Item Options
-
item_placeholder_title_override
Override the title of placeholder items (for missing modded items).
Default: "" (uses default translation)
-
item_placeholder_description_override
Override the description of placeholder items.
Default: "" (uses default translation)
FAQ
Q: What happens if I have modded items and join a server without that mod?
A: PlayerSync will create a placeholder item so your original item is not lost. When you return to a server with the mod, your item will be restored.
Q: Is my data safe?
A: Yes! All data is stored in a central database and is not lost when switching servers.
Q: Does this work for singleplayer?
A: PlayerSync is designed for multi-server networks. It is not needed for singleplayer.
Q: What mods are supported?
A: Curios API and Sophisticated Backpacks are supported out of the box. More mod support may be added in the future.
Support
If you have questions or need help, please contact us via Github or Discord.
Enjoy seamless play across all your servers with PlayerSync!
评论 0
登录后参与评分
还没有评论,来抢沙发吧