COWMODSКаталог модов

InvSYNC

Cross-server player data sync over MySQL. Inventory, ender chest, stats and effects follow the player, handed over by ownership instead of timing delays, so nothing duplicates and nothing is lost.

2310обновлён 18 окт. 2026 г.
ХранениеУтилиты

Описание

InvSYNC

Discord Release Downloads Servers License

Built with Java 21 Available for Paper Available for Folia Available for Bukkit

Chat with us on Discord Available on Codeberg

bStats

InvSYNC

Cross-server player data synchronisation over MySQL, for Paper and Folia 1.21+.

Author: LucasTHCR - https://dc.gg/paperstream


What it does

Shares inventory, armour, offhand, ender chest, XP, health, hunger, potion effects and status values (absorption, exhaustion, air, burning, fall distance) between any number of servers through one MySQL database. Every part can be switched off individually.

Custom and modded items are stored through the server's own item format, so full NBT and component data survives. No ProtocolLib, no extra dependency.

What makes it different

Most inventory sync plugins write on quit, read on join and put a fixed delay in between. When the timing does not hold, items duplicate or a session is lost. InvSYNC does not rely on timing.

Ownership instead of a delay. A player's row is claimed by exactly one server at a time. When the player leaves, that server writes their data and hands the row back. The next server waits for the handover, not for a timer. Two servers can never hold the same player at once.

Everything happens before the player enters the world. Claiming, reading and decoding run in the pre-login phase. A failure ends as a login refusal rather than a half applied inventory.

Failures never destroy data.

SituationWhat happens
Another server still owns the dataLogin refused, retry in a moment
Stored data cannot be decodedLogin refused, stored data untouched, copy kept for inspection
Data written by a newer Minecraft versionRefused. Item data can be upgraded, never downgraded
Database unreachable at loginLogin refused, because letting a player in without their data means saving that emptiness later
Database unreachable at saveWrite parked on disk and retried; ownership stays held so no other server serves the outdated revision
Inventory cannot be readPrevious revision stays, ownership handed back
Server crashed while holding rowsReleased automatically on next start

Empty is not the same as missing. A synchronised but empty inventory is applied, a section that is switched off is left alone. Collapsing the two duplicates items: a player who empties their inventory on one server gets the contents back on the next one.

Snapshots. Every save keeps a restorable copy. /invsync snapshots <player> lists them, /invsync restore <player> <id> rolls one back.

Install

  1. Create an empty MySQL database. InvSYNC creates the tables itself.
  2. Drop the jar into plugins/ on every server that should share data.
  3. Start once to generate config.yml, then stop.
  4. Fill in the database section.
  5. Give every server its own server-id. Leave it empty to derive one from the hostname and port, which is fine as long as no two servers collide.
  6. Start.

All servers must run the same Minecraft version, or at least never an older one than the version that last wrote the data.

Commands

CommandPurpose
/invsync statusConnection, ownership, parked saves
/invsync save <player>Write their data now
/invsync unlock <player>Release data stuck on a server that will not come back
/invsync snapshots <player>List restorable copies
/invsync restore <player> <id>Roll back to a copy
/invsync reloadRe-read config.yml

Permissions: invsync.admin covers all of them, or grant invsync.admin.<subcommand> individually.

invsync.sync (default true) marks a player as synchronised, invsync.bypass excludes them entirely.

Configuration notes

database.* and server-id are only read on startup. Everything else is picked up by /invsync reload.

ownership.on-timeout decides what happens when the previous server does not hand the data back in time. deny refuses the login and loses nothing. takeover loads the data anyway and can duplicate items. The default is deny.

auto-save only protects against crashes. A normal quit always saves.

Building

mvn clean package

Produces target/InvSYNC-<version>.jar. MySQL Connector and HikariCP are shaded and relocated, so the jar has no external dependencies.

Tests

mvn test

The ownership tests start a real MariaDB for the run, because the locking depends on MySQL behaviour that a compatibility layer does not reproduce: INSERT IGNORE, affected row counts and InnoDB row locking. That server binary is a 149 MB test artifact; mvn package -DskipTests avoids it entirely.

What is covered:

  • 1000 races between 8 servers claiming the same player, exactly one winner each.
  • 500 consecutive server switches without losing or forking a revision.
  • Stale takeover, crash recovery scoping, refused writes after ownership moved, snapshot pruning, maintenance skipping claimed rows.
  • 2000 randomised snapshot round trips, plus format 1 and format 2 payloads decoding correctly under the current version.
  • Truncated, foreign and newer-format payloads raising an error rather than producing plausible looking data.
  • 1000 randomised economy settle runs against a fake economy plugin that loads late and overwrites, asserting no run ever reports success with a wrong balance.

Not covered: anything that needs a running Paper server, which includes item serialisation itself and the real Vault path.

Limits worth knowing

  • Ender chest size is assumed to be the vanilla 27 slots. Plugins that resize it are not accounted for.
  • Economy balances can be synchronised through Vault, but the feature is off by default and needs a second switch to enable. A balance changed while the player is offline is overwritten on their next login, and no design inside this plugin can prevent that. Pointing the economy plugin at a shared database is the better answer. See docs/vault-economy-plan.md.
  • Homes, claims and other plugin data are not synchronised.

Metrics

InvSYNC reports anonymous usage data to bStats: server software and version, Java version, player count, and a handful of InvSYNC settings (timeout behaviour, which sections are synchronised, snapshot count, whether economy sync is on, and how many saves are currently parked on disk). No player names, no UUIDs, no inventory data, no database credentials.

Opt out for every plugin at once in plugins/bStats/config.yml.

License

GNU General Public License v3.0. See LICENSE.

Последние версии

Все версии →
release

1.2.1-RELEASE

1.2.1-RELEASE
18 окт. 2026 г.99Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1, 26.1.2, 26.3bukkit, folia, paper
Скачать
Что нового
### Fixed - Items could get lost or duplicated when a player switched servers through a proxy such as Velocity or BungeeCord. The proxy keeps the player on the previous server until the next one has accepted the login, so the next server claimed the data before the previous one could save. On top of that a claim was only refreshed by the auto-save and counted as abandoned after `ownership.stale-after-ms`, so the next server took it over and loaded the last auto-save, and the final save of the previous server was refused. - Data is now claimed in the configuration phase (Paper 1.21.7 and newer). The proxy has dropped the player from the previous server at that point, so its final save is what the next server loads. The player is still not in the world. - A running server refreshes its claims every quarter of `ownership.stale-after-ms`. Only a server that stopped running can lose a claim to the stale takeover. - A login that ends before the player reaches the world releases its claim at once instead of after 30 seconds. ### Added - `/invsync backups <player>` lists the copies on the server's disk, and `/invsync restore <player> local:<id>` applies one. Saves refused after a server switch were always kept there, this brings them back. Every restore keeps the replaced state as a snapshot. Permission `invsync.admin.backups`. - Refused saves are filed as `-refused.snapshot` and no longer rotate out with the routine copies.
release

1.2.0-RELEASE

1.2.0-RELEASE
12 окт. 2026 г.39Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1, 26.1.2, 26.3bukkit, folia, paper
Скачать
Что нового
### Changed - First stable release with Folia support. Every read and write of a player now runs on the thread that owns that player, auto-save and the economy settle use the global and async schedulers. Paper behaves exactly as before. - Servers on the default `release` update channel now get the 1.1.0 changes as well.
beta

InvSYNC 1.1.0-BETA

1.1.0-BETA
24 сент. 2026 г.14Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1, 26.1.2bukkit, folia, paper
Скачать
Что нового
- Runs on Folia. Work that touches the world or a player now goes through the region and entity schedulers there, and bStats stays off on Folia. Paper, Purpur and Spigot behave as before. - Database work stays async on every platform.
release

InvSYNC 1.0.1-RELEASE

1.0.1-RELEASE
22 авг. 2026 г.55Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1, 26.1.2bukkit, paper
Скачать
Что нового
Adds bStats metrics and a badge header. No change to how data is synchronised. - bStats charts for the timeout behaviour, the synchronised sections, snapshot count, economy sync and the number of saves parked on disk - Nothing player-identifying is reported. Opt out in plugins/bStats/config.yml - Fixes carried over from the last build: connects to MySQL 8 without SSL (allowPublicKeyRetrieval), and no more Hikari idle timeout warning on start
release

InvSYNC 1.0-RELEASE

1.0-RELEASE
22 авг. 2026 г.21Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1, 26.1.2bukkit, paper
Скачать
Что нового
First release under the name InvSYNC. - Ownership based handover between servers instead of timed reads and writes - Inventory, armour, offhand, ender chest, XP, health, hunger, potion effects and status values - Snapshots with `/invsync snapshots` and `/invsync restore` - Parked writes retried when the database is briefly unreachable - Optional Vault economy sync, off by default