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
|
2021-06-13 07:13:07 +02:00
|
|
|
index 4ea1e8b1442c9dc9d282b8cb51c2e588fe4b19a7..ce77dc9e046be1e22d2a6d485d8f17a5fd11949e 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
|
2021-06-13 07:13:07 +02:00
|
|
|
@@ -2117,7 +2117,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
|
2021-06-13 07:13:07 +02:00
|
|
|
index 35aa8b40a26a5941d07421f96b424b975a32224e..55cd070c2dbf4cf4d8d0fc62067e9bde69ac7e84 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
|
2021-06-12 11:01:04 +02:00
|
|
|
@@ -2822,7 +2822,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
|
|
|
|
|