Make sure to run LoginEvent Last fixes #48

This commit is contained in:
mohammed jasem alaajel 2022-09-14 08:09:43 +04:00
parent a51ff98909
commit 74ed18e9b3
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@ import java.util.*;
import static com.imaginarycode.minecraft.redisbungee.api.util.serialize.Serializations.serializeMultimap; import static com.imaginarycode.minecraft.redisbungee.api.util.serialize.Serializations.serializeMultimap;
import static com.imaginarycode.minecraft.redisbungee.api.util.serialize.Serializations.serializeMultiset; import static com.imaginarycode.minecraft.redisbungee.api.util.serialize.Serializations.serializeMultiset;
import static net.md_5.bungee.event.EventPriority.HIGHEST;
public class RedisBungeeBungeeListener extends AbstractRedisBungeeListener<LoginEvent, PostLoginEvent, PlayerDisconnectEvent, ServerConnectedEvent, ProxyPingEvent, PluginMessageEvent, PubSubMessageEvent> implements Listener { public class RedisBungeeBungeeListener extends AbstractRedisBungeeListener<LoginEvent, PostLoginEvent, PlayerDisconnectEvent, ServerConnectedEvent, ProxyPingEvent, PluginMessageEvent, PubSubMessageEvent> implements Listener {
@ -36,7 +37,7 @@ public class RedisBungeeBungeeListener extends AbstractRedisBungeeListener<Login
} }
@Override @Override
@EventHandler @EventHandler (priority = HIGHEST)
public void onLogin(LoginEvent event) { public void onLogin(LoginEvent event) {
event.registerIntent((Plugin) plugin); event.registerIntent((Plugin) plugin);
plugin.executeAsync(new RedisTask<Void>(plugin) { plugin.executeAsync(new RedisTask<Void>(plugin) {

View File

@ -44,7 +44,7 @@ public class RedisBungeeVelocityListener extends AbstractRedisBungeeListener<Log
super(plugin, exemptAddresses); super(plugin, exemptAddresses);
} }
@Subscribe @Subscribe (order = PostOrder.LAST)
public void onLogin(LoginEvent event, Continuation continuation) { public void onLogin(LoginEvent event, Continuation continuation) {
plugin.executeAsync(new RedisTask<Void>(plugin) { plugin.executeAsync(new RedisTask<Void>(plugin) {
@Override @Override