SpongeForge + Bungee Player Data/Inventory Sync

I am looking for a way to keep a number of Bungee + Sponeforge servers in sync Player Data wise.

From what I can see this is not currently possible in 1.10.2

Well… This is certainly possible in any version of sponge, so long as you have access to a database, such as MySQL. The general idea would be to save the player data to the database when they quit, and retrieve it and set it to them when they join. Unfortunately, I don’t know how to use database, and I’m quite busy at the moment, so I don’t think this is something I can make…

I seperate way this might be able to be done is when PlayerLogoutEvent (Probably not the actual name) is called it just copies the player data to the other servers using normal Java file copy methods…

I wouldn’t suggest syncing player data for modded servers though.

Edit: On a seperate note, this is the very next post I read today: Project Inventories

And one of the features listed is what you are looking for.

I wouldn’t suggest full player data syncing at all - especially behind a Bungee network. It would be better if @TheMattaBase told us what he was looking to sync so that any developer wanting to take this on might have a good idea as to what needs to be done. Anyone doing this really needs to make sure they know how Bungee (or any proxy software) works and not just rely on login and logout events

The problem with syncing on a BungeeCord setup is how a player transfers from one server to another. During this transfer, the player is logged in on two servers at once. This is so the player does not get kicked from the first server if the second server rejects the connection, so the login event on the second server happens BEFORE the logout event on the first server - meaning that any sync operation at this time is useless, because the sync would happen far too late. You could mitigate this by sending players through a hub server that holds players there for a few moments, but that’s not really an elegant solution.

If you are looking to sync perms, LuckPerms does it, I think. As @axle2005 suggests, ProjectInventories is also something else that might help you. However, full player syncs most likely won’t work and it’s better to just sync what is important, and do it ahead of time.

1 Like

Thanks for the response guys. I do apologize for wording my inquiry so poorly.

I was firstly looking for inventories, which looks like project inventories will handle just fine.

Luckyperms also looks like it solve the perms syncing I am looking for.

I am looking to run a modded server where each dimension is its own server, so wanting to sync inventories, levels and health.

ProjectInventories does sync health, food and experience