3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch
Riley Park 9907cedecb
New chat events for better Adventure support (#5289)
Bump Adventure to 4.6.0

fixes #5216
fixes #5261
fixes #5287
2021-03-01 19:07:12 -08:00

34 Zeilen
1.6 KiB
Diff

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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index a812bb96596ddebe6118b2fd79a75e5e87d622f2..7a9e237d23051b43fe0ac3720cd6a36faabc9dd2 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1933,7 +1933,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 5b51b2b0b47a39ed1fcbb89cb240032de0b32aa8..9d4f0a309a2328aff7b036dafa0a21921e36bacd 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2661,7 +2661,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