Open Hutch79 opened 2 years ago
There will be added an option to set the auto-sync interval.
Ok, thanks!
One question remaining. Does the auto-sync first check if something is different and then pull the data? If I set this to 5 seconds, for example, to prevent multiple purchases with the same money, I assume that it could be quit laggy.
Maybe for the future, something like pluginmsg could be nice. So if on one server the balance of a player chances, the server sends an info to the other servers "hey, please update".
Synchronization will be done async, so it will not lag. Plugin Message is not ideal too, it will not work when there is 0 players on the server.
Ok, if it's async it's nice!
If none is online, there also is no chance for anybody to buy something, so i don't see the problem with pluginmsg
If you give points on a Lobby server with 0 online, while that player is playing on other server, it won't work. And this also requires the plugin to be installed on BungeeCord, so it's not that perfect.
It seems that the syncing between paper servers in the same bungee over a MySQL Database is very slow. If I add Gamepoints to a User on server1, server2 needs a couple of minutes to realize that and refresh the balance and baltop.
Is this only the balance and baltop command and the shop always gets the newest data from the database, or is the shop also impacted by this?
My problem is, I use this plugin as a server wide currency and shop. Therefore, if a player buys something on server1 and joins server2, it might be possible that he buys two items for the price of one.
If the Shop is not impacted, basically everything is fine for me. Otherwise, I would be really thankful for a fix, because the plugin is really great for my use case!
A possible solution could maybe be pluginmsg where the plugin gets notified "hey, please update the Database" on Shop purchases or if someone gets gamepoints.