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
|
2024-01-22 19:01:10 +01:00
|
|
|
index ac0b8d569a71098f92aa3d02f1f3d459e20755ab..ede3afab5c2a1d175a5beea85ffa362a3481a857 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
|
2023-12-05 22:34:01 +01:00
|
|
|
@@ -2495,7 +2495,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();
|
2024-01-22 19:01:10 +01:00
|
|
|
+ return super.isImmobile() || (this.connection != null && this.connection.isDisconnected()); // Paper - Fix duplication bugs
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2023-09-21 22:35:39 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
2024-01-22 19:01:10 +01:00
|
|
|
index 66497960995dc30abe60d26200979a78513ff2c6..4ff58939269f420fab18fea8fc3887e86297b99e 100644
|
2023-09-21 22:35:39 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
2023-12-25 11:51:44 +01:00
|
|
|
@@ -146,7 +146,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean isDisconnected() {
|
|
|
|
- return !this.player.joining && !this.connection.isConnected();
|
2024-01-22 19:01:10 +01:00
|
|
|
+ return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper - Fix duplication bugs
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
|