2021-06-11 14:02:28 +02:00
|
|
|
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/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-09-26 10:02:51 +02:00
|
|
|
index 2ffce1200abe7ab7b50a187069e63392c0b3bfdd..776d2b38f284e13ec9a7dd67a538626817c79887 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-09-26 10:02:51 +02:00
|
|
|
@@ -2195,7 +2195,7 @@ public class ServerPlayer extends Player {
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
@Override
|
2021-06-12 11:01:04 +02:00
|
|
|
public boolean isImmobile() {
|
|
|
|
- return super.isImmobile() || !this.getBukkitEntity().isOnline();
|
2021-06-11 14:02:28 +02:00
|
|
|
+ return super.isImmobile() || (this.connection != null && this.connection.isDisconnected()); // Paper
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2022-09-12 13:31:45 +02:00
|
|
|
index 75bc0d9e8ec46d1fcfd6d5886d5ab03537e575d2..9df3561fca35b1649de1545e924bd96ec5f80089 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2022-09-12 13:31:45 +02:00
|
|
|
@@ -3283,7 +3283,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean isDisconnected() {
|
|
|
|
- return !this.player.joining && !this.connection.isConnected();
|
|
|
|
+ return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
|