Open Rican14 opened 3 years ago
Yes indeed! Thank you for creating the issue here :+1:
this is a much needed function.
In my opinion can add another JDBC table for sync unlock, thats what mysql player data bridge and many mysql sync plugin doing.
Methods: when player enter a server, a lock is applied to a player indicating that they are in server, a boolean true in database.
Then if a player log off, the lock is removed,to null.
If the player is switching to another server, the server they switched to will have to wait for the lock to be removed by other server, then load the item/enderchest.
Plugin can check when player first login, then every 1 second for player to see is locked or not. (This prevent player login faster than JDBC query)
[additional feature] For server that crashes and caused dead locks, can add a setting so that if the server detected 10-50 wait of lock release has pass, automatically unlease the lock.
I am not a pro java programmer, sadly I can't help much
An very important update, for multi server sections