Fix "No Session" in plugin messaging

After Bungee recieved a plugin message from Bukkit, that it has
completed login/register for a Floodgate player, bungee would throw a
NullPointerException: Cannot invoke "BungeeLoginSession.getProfile()"
because "loginSession" is null
This commit is contained in:
Smart123s
2021-10-24 18:24:50 +02:00
parent 40b4eae756
commit 4c514c269b

View File

@ -53,6 +53,7 @@ public class FloodgateAuthTask
@Override
protected void startLogin() {
BungeeLoginSession session = new BungeeLoginSession(player.getName(), isRegistered, profile);
core.getPlugin().getSession().put(player.getPendingConnection(), session);
// enable auto login based on the value of 'autoLoginFloodgate' in config.yml
boolean forcedOnlineMode = autoLoginFloodgate.equals("true")