From bb6b31d7157c1f024111f3f4182e352ce6746139 Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 29 Oct 2016 21:12:55 +0100 Subject: [PATCH] change Sponge listener priorities --- .../main/java/me/lucko/luckperms/sponge/SpongeListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java index 29830b3b..4cc44ea3 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java @@ -29,6 +29,7 @@ import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.AbstractListener; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.event.Listener; +import org.spongepowered.api.event.Order; import org.spongepowered.api.event.network.ClientConnectionEvent; import org.spongepowered.api.profile.GameProfile; import org.spongepowered.api.text.serializer.TextSerializers; @@ -47,7 +48,7 @@ public class SpongeListener extends AbstractListener { this.plugin = plugin; } - @Listener + @Listener(order = Order.EARLY) public void onClientAuth(ClientConnectionEvent.Auth e) { if (!plugin.getDatastore().isAcceptingLogins()) { /* Datastore is disabled, prevent players from joining the server @@ -60,7 +61,7 @@ public class SpongeListener extends AbstractListener { } @SuppressWarnings("deprecation") - @Listener + @Listener(order = Order.EARLY) public void onClientLogin(ClientConnectionEvent.Login e) { final GameProfile player = e.getProfile(); final User user = plugin.getUserManager().get(plugin.getUuidCache().getUUID(player.getUniqueId()));