ServerRouter 5.2.0 — Shared Inventory Update
ServerRouter 5.2.0 adds a new optional Shared Inventory module and improves the organization of generated configuration and language files.
This update builds on ServerRouter 5.1.0 and focuses mainly on integrated inventory synchronization between routed servers.
What’s New in 5.2.0
Integrated Shared Inventory Module
ServerRouter now includes an optional built-in inventory sync module for connected servers.
Shared Inventory Across Servers
Players can keep the same inventory while moving between servers connected through ServerRouter.
Optional inventorySync Section
A newinventorySyncsection has been added toconfig.jsonand can be enabled or disabled at any time.
Uses Existing ServerRouter Database Settings
The inventory sync module uses the existing ServerRouterserverIdand database configuration. No separate database block is required.
Inventory Auto-Save
The shared inventory module supports automatic inventory saving with a configurable interval.
Inventory Lock Protection
Inventory locking helps protect player data while players are moving between servers.
Language-Key Based Inventory Messages
Inventory loading and locked messages now use ServerRouter language keys by default.
New Inventory Language Keys
Generated language files now include the new inventorySync message keys.
Improved Language File Organization
InventorySync messages are now grouped in their own language section instead of being added randomly at the end of the file.
Improved Config Organization
TheinventorySyncsection is now added near the other ServerRouter modules instead of being appended at the bottom of the config.
Updated Startup Version
Startup logs now correctly report ServerRouter v5.2.0.
New Config Section
JSON:"inventorySync": { "enabled": false, "lockTtlSeconds": 120, "lockRefreshSeconds": 30, "autoSaveEnabled": true, "autoSaveIntervalSeconds": 600, "profileSaveDelayMillis": 1500, "loadingInventoryMessageEnabled": true, "loadingInventoryMessage": "server.serverrouter.inventory.loading", "lockedInventoryMessage": "server.serverrouter.inventory.locked" }
New Language Keys
Code:serverrouter.inventory.loading=[color:green](color:green)Loading shared inventory...</color> serverrouter.inventory.locked=[color:red](color:red)Inventory is still being saved on another server. Please try again in a few seconds.</color>
Important Notes
- The
inventorySyncmodule is disabled by default.- Enable it only if you want shared inventory across your routed servers.
- Do not enable the integrated inventorySync module while also running a separate standalone inventory sync plugin.
- All servers using shared inventory should run the same ServerRouter version.
- All servers should use the same ServerRouter database settings and unique
serverIdvalues.
Upgrade Recommendation
If you are updating from ServerRouter 5.1.0, replace the old JAR with ServerRouter 5.2.0 on every server in your network.
For best results:
- Update every server to ServerRouter 5.2.0.
- Start each server once so the new config section and language keys can be added.
- Review the new
inventorySyncsection inconfig.json.- Enable
inventorySynconly if you want shared inventory between servers.- Restart all servers after changing inventorySync settings.
ServerRouter 5.1.0 — Major Update
ServerRouter 5.1.0 is a major update focused on easier setup, safer portal handling, automatic portal item generation, and improved localization support.
This update changes how portal items are managed: portal assets are no longer stored inside the plugin JAR. ServerRouter now automatically generates portal item assets from your configured routes inside the externalmods/ServerRouter/folder.
This means server owners no longer need to edit the JAR to add, update, or keep custom portals.
What’s New in 5.1.0
- Automatic External Portal Item Generation
ServerRouter now generates portal items automatically based on the routes defined in the config.
- No JAR Editing Required
Portal items, generated assets, and language files are now stored outside the plugin JAR inmods/ServerRouter/.
- Generated Portal Assets
For every configured route, ServerRouter can generate a matching portal item that can be found in the creative inventory after a restart.
- Persistent Custom Files
Generated files are not overwritten once they already exist, allowing server owners to customize portal items and language files safely.
- Generated Language Files
ServerRouter now generates language files for multiple locales, including:
en-US,it-IT,de-DE,es-ES,fr-FR,pt-BR,ru-RU, andtr-TR.
- Language-Key Based Messages
Default player-facing messages now use language keys, making translation and customization cleaner.
- Direct Message Fallback
Server owners can still write normal text directly in the config if they prefer not to use language keys.
- Improved Portal Safety
Portal protection has been improved to prevent accidental portal loops when players join, transfer, or load slowly near a portal.
- Pre-Ready Portal Safety
The new safety handling protects players even before the player-ready event is fully completed.
- Orphaned Portal Protection
If a portal item still exists but its route was removed from the config, it no longer causes startup issues. The portal simply shows a missing destination message.
- Access Denied Message Localization
The access denied message is now also available through the generated language system.
Generated File Structure
After configuration, ServerRouter can generate a structure like this:
Code:mods/ServerRouter/ ├─ config.json ├─ manifest.json └─ Server/ ├─ Item/ │ └─ Items/ │ └─ Portal/ │ ├─ ServerRouter_Portal_Hub.json │ ├─ ServerRouter_Portal_Survival.json │ └─ ServerRouter_Portal_Creative.json └─ Languages/ ├─ en-US/ │ └─ server.lang ├─ it-IT/ │ └─ server.lang ├─ de-DE/ │ └─ server.lang ├─ es-ES/ │ └─ server.lang ├─ fr-FR/ │ └─ server.lang ├─ pt-BR/ │ └─ server.lang ├─ ru-RU/ │ └─ server.lang └─ tr-TR/ └─ server.lang
Important Notes
- Newly generated portal items may require one additional server restart before they appear in the creative inventory.
- Existing generated portal files are not overwritten automatically.
- Existing language files are not overwritten automatically.
- If a route is removed but a portal still exists, the portal will not crash the server.
- You should install the same ServerRouter version on every server in your network.
Updated Features Included
- Command-based server routing
- Portal-based server routing
- Automatic route-based portal item generation
- External generated asset pack
- Multi-language generated templates
- MariaDB heartbeat and server status synchronization
- Online/offline/full/accepting-player checks
- BetterScoreBoard placeholder integration
- Colored status placeholders
- NetworkChat between servers
- NetworkEvents for join, quit, and server switching
- Respect vanish support for network events
- Server-switch join/quit spam protection
- Login portal safety
- Arrival portal cooldown
- Same-server rejoin protection
- Missing route / orphaned portal safety
Upgrade Recommendation
If you are updating from an older ServerRouter version, replace the old JAR with ServerRouter 5.1.0 on all servers in your network.
ServerRouter will keep your existing config values and generate missing files when needed.
For best results:
- Update every server to 5.1.0.
- Start the server once to generate missing files.
- Restart once more if new portal items were generated.
- Customize generated files inside
mods/ServerRouter/, not inside the JAR.
Portal anti-loop safety
ServerRouter includes two protections against portal loops:
portalArrivalCooldownSeconds: protects a player after a successful ServerRouter transfer/arrival.loginPortalSafetySeconds: protects a player after any login/ready event, even if the previous transfer did not complete cleanly.
Both default to20seconds in the generated configuration. SetloginPortalSafetySecondsto0only if you intentionally want to disable the generic login safety window.
Automatic config migration:
ServerRouter 5.0.1 adds automatic config migration for existing config.json files. When the plugin starts, missing new options are added while existing values are kept. The config may be rewritten with pretty JSON formatting and UTF-8 encoding.
New portal safety option:
JSON:"portalArrivalCooldownSeconds": 20, "loginPortalSafetySeconds": 20
Each route can also define the message shown when a portal is blocked by the login/arrival safety window:
JSON:"portalSafetyMessage": "&6Please wait a few seconds before using this portal. You have just joined this server."
The message supports{server}and color codes such as&6,&a, and&7.
