diff --git a/src/main/java/net/minestom/server/network/ConnectionManager.java b/src/main/java/net/minestom/server/network/ConnectionManager.java index 24aaf4360..f9a49c2aa 100644 --- a/src/main/java/net/minestom/server/network/ConnectionManager.java +++ b/src/main/java/net/minestom/server/network/ConnectionManager.java @@ -349,11 +349,14 @@ public final class ConnectionManager { if (playerConnection instanceof PlayerSocketConnection) { final PlayerSocketConnection socketConnection = (PlayerSocketConnection) playerConnection; socketConnection.writeAndFlush(disconnectPacket); + playerConnection.disconnect(); try { socketConnection.getChannel().close(); } catch (IOException e) { e.printStackTrace(); } + } else { + player.remove(); } } this.players.clear();