EssentialsX

EssentialsX

2M Downloads

Force configuration read on join ?

Blamo27 opened this issue ยท 8 comments

commented

Hello,

I have two separate servers, and have symlinked the folders "userdata" so they can be linked (united).
Problem is, when a player performs a /kit on a server, and goes on the other server, he can get the kit again regardless of the cooldown of the kit (the cooldown is specific to each server, when it should be the same for the two servers), even if the player file in the "userdata" folder has been modified.

So, when a player joins any of the two servers, the configuration must be read by force for that specific player.

commented

This is not intended use of EssentialsX's userdata. I don't know how efficient it would be to watch and reload user data, but I don't think that this is a reliable way to sync user data.

commented

@md678685 So how to sync data ?

commented

Essentials is probably not the right plugin for this purpose then. See #1946

commented

@md678685 @AgentTroll Issue fixed with the Essentials MySQL Storage Extension plugin.

commented

@Blamo27 This only makes it possible to store data in mysql, I have used this plugin myself (for the way its made for). Remember bungee disconnects the players on the old server after he/she joins the new server, This means that both servers have about -100 (yes, negative) miliseconds to exchange the new playerdata, And thats of course impossible.
Edit: Yes, It is possible if he is not using bungeecord, But then i dont see any purpose really, Also this plugin is not designed for syncing, But for storing a large amount of userdata in mysql, So you can edit it easyer is guess

commented

@Xeyame He is not using BungeeCord, only Bukkit. Essentials MySQL Storage is designed for syncing as the author wrote in his plugin description.

I think that the plugin is just loading data on PlayerJoinEvent, there is no exchange of data between servers. The cooldowns are working when connecting to server A from server B for example.

commented

@Blamo27
What this plugin does it upload the player's data file to a mysql server when someone leaves the server, Then delete the player file. If configured, it downloads the new player file on the fly when joining. I was assuming he is using bungee as i dont see any point in syncing data between 2 seperate servers. Although still using some other cooldown plugin is probably still best, As Essentials really is not designed for this and it's very unefficent to sync everything like money and logout cords. Some other plugin can just write the last timestamp someone used that command in a simple table and do a query to the database when someone executes that command. This has way less issues and is also less prone to break (Delays on sync, data getting overwritten from other servers)
Also you probably mean PlayerLoginEvent and not PlayerJoinEvent in this case, As starting to load data at that point would likely be too late.

commented

Agreed. You'll probably get better results storing only what you need rather than everything that essentials requires to save the user state.