Ignore plugin messages from disconnected players
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user