2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2025-04-20 01:27:07 +00:00

fix players count as online if login event is canceled firstly by another plugin

This commit is contained in:
mohammed jasem alaajel 2021-06-26 20:16:11 +04:00
parent 1eba10b8d6
commit 185f62c284

View File

@ -44,6 +44,9 @@ public class RedisBungeeListener implements Listener {
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)
public void onLogin(final LoginEvent event) { public void onLogin(final LoginEvent event) {
if (event.isCancelled()){
return;
}
event.registerIntent(plugin); event.registerIntent(plugin);
plugin.getProxy().getScheduler().runAsync(plugin, new RedisCallable<Void>(plugin) { plugin.getProxy().getScheduler().runAsync(plugin, new RedisCallable<Void>(plugin) {
@Override @Override