mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-06-26 22:44:47 +02:00
Performance enhancement
This commit is contained in:
parent
ed8a91d167
commit
59fb2d23cc
|
@ -48,8 +48,8 @@ public class JoinQuitListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onPlayerLogin(AsyncPlayerPreLoginEvent evt) {
|
||||
Bukkit.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, () -> {
|
||||
plugin.getEconomyManager().getBackend().reloadDatabase(); // TODO: If servers start to lag when lots of people join, this is why.
|
||||
}, 0);
|
||||
Bukkit.getServer().getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||
plugin.getEconomyManager().getBackend().reloadUser(evt.getUniqueId().toString()); // TODO: If servers start to lag when lots of people join, this is why.
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user