Synchro
Synchro 将多人生存模式转变为共享的玩家状态。物品栏、盔甲、生命值、饥饿值、效果、经验值、进度、末影箱、着火状态、睡眠和死亡都可以同步,使一群玩家作为一个合并的角色进行游戏。
如果你想要一种每个行动都对所有人至关重要的合作挑战,Synchro 正是为这种服务器风格而构建的。
亮点
- 共享物品栏、盔甲、末影箱、进度、生命值、饥饿值、饱和度、经验值和药水效果
- 单人睡眠即可跳过夜晚,无需整个团队进入床铺
- 同步着火刻、死亡、重生处理以及死后物品栏状态
- 通过版本化共享状态和延迟应用保护机制防止竞态条件
- 更安全的物品栏处理,适用于合成、熔炉提取、漏斗、拾取、掉落、桶、载具、物品展示框和
/give 命令
- 每个模块都有
config.yml 开关,支持 /synchro reload 重载
- 管理工具包括强制同步、恢复、调试日志、状态查看和版本检查
- 可选的 Modrinth 和 GitHub 更新通知(针对拥有管理员权限的玩家)
- Folia 感知调度路径,并兼容 Bukkit/Paper 回退
命令
/synchro enable
/synchro disable
/synchro sync [module]
/synchro status
/synchro reload
/synchro restore
/synchro debug <on|off>
/synchro version
支持的同步模块包括 all、inventory、armor、effects、potion-effects、health、hunger、experience、xp、ender-chest 和 fire-ticks。
权限
synchro.admin - 使用 Synchro 管理命令并接收更新通知
配置
默认情况下所有模块均已启用。在 config.yml 中将某个模块设置为 false 并运行 /synchro reload 即可仅禁用该部分的同步功能。
sync:
inventory: true
armor: true
potion-effects: true
health: true
hunger: true
experience: true
death: true
ender-chest: true
advancements: true
one-player-sleep: true
fire-ticks: true
debug:
enabled: false
update-checker:
enabled: true
check-interval-minutes: 60
notify-permission: synchro.admin
modrinth-project: "I0rM9fEI"
github-repo: "St1ch/Synchro"
典型工作流程
- 安装 Synchro 并启动服务器一次以生成
config.yml。
- 两名或更多玩家加入服务器并运行
/synchro status。
- 如有需要,使用
/synchro sync 初始化共享状态。
- 根据你的合作挑战类型调整
config.yml 中的模块开关。
- 修改配置后运行
/synchro reload。
- 在测试边缘情况时使用
/synchro debug on,正常游玩时请将其关闭。
更新通知
当发现新版本时,拥有 synchro.admin 权限的玩家在加入时会收到通知。Modrinth 检查使用项目 I0rM9fEI,GitHub 发布检查使用 St1ch/Synchro。
检查器由 update-checker.check-interval-minutes 缓存,因此不会在每次加入时调用远程 API。
API 用法
其他插件可以使用 Synchro 的 API:
import org.redstone.SynchroAPI;
if (SynchroAPI.isSyncEnabled()) {
// Do something.
}
SynchroAPI.setSyncEnabled(false);
SynchroAPI.manualSync();
开发
使用以下命令构建插件:
.\gradlew.bat build
构建好的 jar 文件将位于 build/libs 中。
兼容性
- Minecraft:
1.18 至 1.21.x
- 核心:Bukkit, Spigot, Paper, Folia
- Java:
17
注意事项
- Synchro 围绕共享生存状态设计,而非每个玩家独立的物品栏。
- 更新检查器使用 Modrinth 和 GitHub 的公共 API,并且仅向具有配置权限的玩家发送通知。
- 一些复杂的物品栏行为依赖于服务器刻 timing;调试日志有助于诊断异常的插件堆栈交互。
许可证
本项目根据 MIT License 分发。
Synchro
Synchro turns multiplayer survival into one shared player state. Inventories, armor, health, hunger, effects, XP, advancements, ender chests, fire state, sleep, and death can all be synchronized so a group plays as one combined character.
If you want a co-op challenge where every action matters for everyone, Synchro is built for that exact server style.
Highlights
- Shared inventory, armor, ender chest, advancements, health, hunger, saturation, XP, and potion effects
- One-player sleep for skipping night without requiring the whole group to enter beds
- Synchronized fire ticks, death, respawn handling, and post-death inventory state
- Race-condition protection with versioned shared state and delayed-apply guards
- Safer inventory handling for crafting, furnace extraction, hoppers, pickups, drops, buckets, vehicles, item frames, and
/give
- Per-module
config.yml toggles with /synchro reload
- Admin tools for force sync, restore, debug logging, status, and version checks
- Optional update notifications from Modrinth and GitHub for players with admin permission
- Folia-aware scheduling paths with Bukkit/Paper fallback
Commands
/synchro enable
/synchro disable
/synchro sync [module]
/synchro status
/synchro reload
/synchro restore
/synchro debug <on|off>
/synchro version
Supported sync modules are all, inventory, armor, effects, potion-effects, health, hunger, experience, xp, ender-chest, and fire-ticks.
Permissions
synchro.admin - Use Synchro admin commands and receive update notifications
Configuration
Every module is enabled by default. Set a module to false in config.yml and run /synchro reload to disable only that part of synchronization.
sync:
inventory: true
armor: true
potion-effects: true
health: true
hunger: true
experience: true
death: true
ender-chest: true
advancements: true
one-player-sleep: true
fire-ticks: true
debug:
enabled: false
update-checker:
enabled: true
check-interval-minutes: 60
notify-permission: synchro.admin
modrinth-project: "I0rM9fEI"
github-repo: "St1ch/Synchro"
Typical Workflow
- Install Synchro and start the server once to generate
config.yml.
- Join with two or more players and run
/synchro status.
- Use
/synchro sync to initialize the shared state if needed.
- Adjust module toggles in
config.yml for the type of co-op challenge you want.
- Run
/synchro reload after config changes.
- Use
/synchro debug on while testing edge cases, then turn it off for normal play.
Update Notifications
When a newer version is found, players with synchro.admin are notified when they join. Modrinth checks use project I0rM9fEI, and GitHub release checks use St1ch/Synchro.
The checker is cached by update-checker.check-interval-minutes, so it does not call remote APIs on every join.
API Usage
Other plugins can use Synchro's API:
import org.redstone.SynchroAPI;
if (SynchroAPI.isSyncEnabled()) {
// Do something.
}
SynchroAPI.setSyncEnabled(false);
SynchroAPI.manualSync();
Development
Build the plugin with:
.\gradlew.bat build
The built jar will be available in build/libs.
Compatibility
- Minecraft:
1.18 to 1.21.x
- Cores: Bukkit, Spigot, Paper, Folia
- Java:
17
Notes
- Synchro is designed around shared survival state, not per-player independent inventories.
- The update checker uses Modrinth and GitHub public APIs and only notifies players with the configured permission.
- Some complex inventory behavior depends on server tick timing; debug logging can help diagnose unusual plugin-stack interactions.
License
This project is distributed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧