Skip to content

Commit

Permalink
Fix NullPointerException on Bungee
Browse files Browse the repository at this point in the history
  • Loading branch information
Defective4 committed May 3, 2024
1 parent f966cb3 commit 935e5bb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.github.defective4.authmeproxy.common.config.ProxyConfigProperties;
import io.github.defective4.authmeproxy.common.config.SettingsDependent;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.connection.Server;
import net.md_5.bungee.api.event.PluginMessageEvent;
Expand Down Expand Up @@ -101,7 +102,8 @@ private void handleOnLogout(final ByteArrayDataInput in) {
if (isSendOnLogoutEnabled) {
final ProxiedPlayer player = authPlayer.getPlayer();
if (player != null) {
player.connect(ProxyServer.getInstance().getServerInfo(sendOnLogoutTarget));
ServerInfo serverInfo = ProxyServer.getInstance().getServerInfo(sendOnLogoutTarget);
if (serverInfo != null) player.connect(serverInfo);
}
}
}
Expand Down

0 comments on commit 935e5bb

Please sign in to comment.