Paper/Spigot-Server-Patches/0189-Properly-fix-item-duplication-bug.patch
Shane Freeder ffb572ce9a
Remove Ignore invalid Marker Icon ID's in maps
Spigot has patched this issue inside MapIcon, meaning that we no longer need to maintain this patch; Spigots patch also fixes #668 in that it will verify the length of the array, as well as protect against a negative type value being fetched from the array. Only real change is that Spigots patch returns a MapIcon.Type.PLAYER, instead of the RED_MARKER as originally PR'd by Aikar.
2017-04-22 15:52:56 +01:00

36 lines
1.5 KiB
Diff

From 7fa342a5b6c89bbc3be05d7b6b87693d2d78c64c 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 56ce2554..a5c5bd4b 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1345,7 +1345,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
}
public void reset() {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 43757500..7c2d43ac 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2565,6 +2565,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start - Add "isDisconnected" method
public final boolean isDisconnected() {
- return !this.player.joining && !this.networkManager.isConnected();
+ return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
}
}
--
2.12.2