testserver/patches/unapplied/server/0123-Properly-fix-item-dupl...

34 lines
1.7 KiB
Diff
Raw Normal View History

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
2021-11-17 05:00:14 +00:00
index da722cddaaa8c40715748de81104a5b213c2fea8..a61798909aee1b73b62c88c22fa6cfc1fe2a5942 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
@@ -2128,7 +2128,7 @@ public class ServerPlayer extends Player {
2021-06-11 12:02:28 +00:00
@Override
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
2021-11-17 05:00:14 +00:00
index 9c7843c2623fce4ec423acbcc0c76a35b1bd5969..36bb3b502a26ab43f442d85b3cad4a1de0a5bda8 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
2021-11-17 05:00:14 +00:00
@@ -2812,7 +2812,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
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