3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/Spigot-Server-Patches/0137-Properly-fix-item-duplication-bug.patch
Zach Brown a4dbabdbd3
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit 7deb3728..d6b3eddf:
  > SPIGOT-5355: Double Chests still open after InventoryOpenEvent cancelled
2019-10-13 00:28:46 -05:00

37 Zeilen
1.5 KiB
Diff

From 7615e6c4249f387bd62392ce23bf5f759be70b85 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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 170f741d4..88bc8b531 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1803,7 +1803,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
protected boolean isFrozen() {
- return super.isFrozen() || !getBukkitEntity().isOnline();
+ return super.isFrozen() || (this.playerConnection != null && this.playerConnection.isDisconnected()); // Paper
}
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 13c1d9b91..068827e2e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2515,7 +2515,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
public final boolean isDisconnected() {
- return !this.player.joining && !this.networkManager.isConnected();
+ return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
}
// CraftBukkit end
--
2.23.0