testserver/Spigot-Server-Patches/0130-Properly-fix-item-dupl...

36 lines
1.7 KiB
Diff
Raw Normal View History

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/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 4b9595f89c75b220fe70840a74e0aaa0276fa122..09385eabefeb7d59de1ce4138648badd123396f9 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -2060,8 +2060,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
@Override
- public boolean isFrozen() {
- return super.isFrozen() || !getBukkitEntity().isOnline();
+ protected boolean isFrozen() {
+ return super.isFrozen() || (this.playerConnection != null && this.playerConnection.isDisconnected()); // Paper
}
2017-08-05 03:10:30 +00:00
@Override
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 908d52f48b4bf2ddd638f2d718e1f6cb6148ce0a..8a5a1ca08073d1a4df949a53fbf7e75339bf2761 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -2819,7 +2819,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
2018-07-17 20:32:05 +00:00
}
public final boolean isDisconnected() {
- return !this.player.joining && !this.networkManager.isConnected();
+ return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
}
2018-07-17 20:32:05 +00:00
// CraftBukkit end
2019-04-27 06:26:04 +00:00