2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Alfie Cleveland <alfeh@me.com>
|
|
|
|
Date: Tue, 27 Dec 2016 01:57:57 +0000
|
|
|
|
Subject: [PATCH] Properly fix item duplication bug
|
|
|
|
|
|
|
|
Credit to prplz for figuring out the real issue
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-06-09 10:51:45 +02:00
|
|
|
index 73fe1f1047e39eeeb8a1444fa353f7d1a8e651b3..4b65dc12dc97e72b221d9fd15202a1a0622ef806 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-06-07 22:12:48 +02:00
|
|
|
@@ -2199,7 +2199,7 @@ public class ServerPlayer extends Player {
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
@Override
|
2021-06-12 11:01:04 +02:00
|
|
|
public boolean isImmobile() {
|
|
|
|
- return super.isImmobile() || !this.getBukkitEntity().isOnline();
|
2021-06-11 14:02:28 +02:00
|
|
|
+ return super.isImmobile() || (this.connection != null && this.connection.isDisconnected()); // Paper
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2022-06-09 13:55:33 +02:00
|
|
|
index af162828963571f87f7b530443fdf6c3fa22fd4d..34f58fb835abaad145e2f1fa71cce193386a28fb 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2022-06-09 13:55:33 +02:00
|
|
|
@@ -3037,7 +3037,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean isDisconnected() {
|
|
|
|
- return !this.player.joining && !this.connection.isConnected();
|
|
|
|
+ return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
|