From efb958ba44a531ab742ccf0365510d0ec34af792 Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 4 Apr 2020 12:04:22 +0100 Subject: [PATCH] Move Bungee connection event registerIntent call to after possible method return --- .../bungee/listeners/BungeeConnectionListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/listeners/BungeeConnectionListener.java b/bungee/src/main/java/me/lucko/luckperms/bungee/listeners/BungeeConnectionListener.java index eae373d2f..1282aa692 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/listeners/BungeeConnectionListener.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/listeners/BungeeConnectionListener.java @@ -60,10 +60,6 @@ public class BungeeConnectionListener extends AbstractConnectionListener impleme This means that a player will have the same UUID across the network, even if parts of the network are running in Offline mode. */ - /* registers the plugins intent to modify this events state going forward. - this will prevent the event from completing until we're finished handling. */ - e.registerIntent(this.plugin.getBootstrap()); - final PendingConnection c = e.getConnection(); if (this.plugin.getConfiguration().get(ConfigKeys.DEBUG_LOGINS)) { @@ -76,6 +72,10 @@ public class BungeeConnectionListener extends AbstractConnectionListener impleme return; } + /* registers the plugins intent to modify this events state going forward. + this will prevent the event from completing until we're finished handling. */ + e.registerIntent(this.plugin.getBootstrap()); + this.plugin.getBootstrap().getScheduler().executeAsync(() -> { /* Actually process the login for the connection. We do this here to delay the login until the data is ready.