Ignore plugin messages from disconnected players

This commit is contained in:
ajgeiss0702
2023-06-10 09:34:02 -07:00
committed by ajgeiss0702
parent 01a5fd14e1
commit f93fbdcfa9
2 changed files with 2 additions and 0 deletions
@@ -30,6 +30,7 @@ public class EventHandlerImpl implements EventHandler {
@Override
public void handleMessage(AdaptedPlayer receivingPlayer, byte[] data) {
if(!receivingPlayer.isConnected()) return;
if(communicationManager == null) {
communicationManager = new CommunicationManager(main);
}
@@ -51,6 +51,7 @@ public class CommunicationManager {
ComResponse response = handler.handleMessage(receivingPlayer, in.readUTF());
if(response == null) return;
if(!receivingPlayer.isConnected()) return;
main.getPlatformMethods().sendPluginMessage(
receivingPlayer,