2021-06-11 12:02:28 +00: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-09-01 16:51:59 +00:00
|
|
|
index 4d8dfe375f5b3b9e5cfc12a6af0b87ae78f9b764..5d214b7dd4f6d7feff0a1904ce6573cffd258a1c 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-09-01 16:51:59 +00:00
|
|
|
@@ -2210,7 +2210,7 @@ public class ServerPlayer extends Player {
|
2021-06-11 12:02:28 +00:00
|
|
|
|
|
|
|
@Override
|
2021-06-12 09:01:04 +00:00
|
|
|
public boolean isImmobile() {
|
|
|
|
- return super.isImmobile() || !this.getBukkitEntity().isOnline();
|
2021-06-11 12:02:28 +00: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-09-09 18:54:00 +00:00
|
|
|
index bfbd6a23a39cf96371ebabbe4a79036acfd3f4b2..846ca6e4437cc827584459511c3e119b35f9ba72 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2022-09-09 18:54:00 +00:00
|
|
|
@@ -3275,7 +3275,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
2021-06-11 12:02:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean isDisconnected() {
|
|
|
|
- return !this.player.joining && !this.connection.isConnected();
|
|
|
|
+ return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
|