Don't crash if no storage is loaded

If the pluign is running on Bukkit, and it's connected to Bungee
then core.getStorage() will be null.
If that's the case, players will be logged in via a plugin messages.
This commit is contained in:
Smart123s
2021-08-26 13:40:41 +02:00
parent 172efafc2b
commit 586b357be8

View File

@ -73,6 +73,13 @@ public abstract class FloodgateManagement<P extends C, C, L extends LoginSession
// check if the Bedrock player is linked to a Java account
isLinked = floodgatePlayer.getLinkedPlayer() != null;
//this happens on Bukkit if it's connected to Bungee
//if that's the case, players will be logged in via plugin messages
if (core.getStorage() == null) {
return;
}
profile = core.getStorage().loadProfile(username);
AuthPlugin<P> authPlugin = core.getAuthPluginHook();