diff --git a/src/main/java/carpet/patches/NetHandlerPlayServerFake.java b/src/main/java/carpet/patches/NetHandlerPlayServerFake.java index a8e5b852e7..98fa0eef61 100644 --- a/src/main/java/carpet/patches/NetHandlerPlayServerFake.java +++ b/src/main/java/carpet/patches/NetHandlerPlayServerFake.java @@ -24,10 +24,13 @@ public void send(final Packet packetIn) @Override public void disconnect(Component message) { - if (message.getContents() instanceof TranslatableContents text && (text.getKey().equals("multiplayer.disconnect.idling") || text.getKey().equals("multiplayer.disconnect.duplicate_login"))) + if (message.getContents() instanceof TranslatableContents text && text.getKey().equals("multiplayer.disconnect.not_whitelisted")) { - ((EntityPlayerMPFake) player).kill(message); + // Whitelist stuff triggers this in multiple places and we shouldn't let fake players randomly disconnect + // as we don't expect them to be whitelisted + return; } + ((EntityPlayerMPFake) player).kill(message); } @Override @@ -41,6 +44,3 @@ public void teleport(double d, double e, double f, float g, float h, Set