geforkt von Mirrors/Paper
0ecc1545dd
--- work/CraftBukkit Submodule work/CraftBukkit a2dd0e303..51c118b1d: > SPIGOT-4619: Incorrect packet order for villager inventories > Fix EntityPickupItemEvent getRemaining / PlayerInventory#canHold
37 Zeilen
1.5 KiB
Diff
37 Zeilen
1.5 KiB
Diff
From 6cffdbfde8f8b4ad03f751ee44f3f96d2b37bea4 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 3ee1d270f..55f4ab93e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -1561,7 +1561,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 849573864..a04bfded1 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -2500,7 +2500,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
|
}
|
|
|
|
public final boolean isDisconnected() {
|
|
- return !this.player.joining && !this.networkManager.isConnected();
|
|
+ return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
|
|
}
|
|
// CraftBukkit end
|
|
}
|
|
--
|
|
2.20.1
|
|
|