diff options
author | Nassim Jahnke <[email protected]> | 2024-12-03 17:58:41 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-12-03 17:58:41 +0100 |
commit | c0a3d51ab35930e410fcd9752ceaff6c3f581c24 (patch) | |
tree | f53076a8b0787d2f544f73f468df94619e5eb1a5 /patches/unapplied/server/0119-Properly-fix-item-duplication-bug.patch | |
parent | da7138233f6392e791d790d1c3407414c855f9c2 (diff) | |
download | Paper-c0a3d51ab35930e410fcd9752ceaff6c3f581c24.tar.gz Paper-c0a3d51ab35930e410fcd9752ceaff6c3f581c24.zip |
Start update, apply API patches
Diffstat (limited to 'patches/unapplied/server/0119-Properly-fix-item-duplication-bug.patch')
-rw-r--r-- | patches/unapplied/server/0119-Properly-fix-item-duplication-bug.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/unapplied/server/0119-Properly-fix-item-duplication-bug.patch b/patches/unapplied/server/0119-Properly-fix-item-duplication-bug.patch new file mode 100644 index 0000000000..3fe8b5e902 --- /dev/null +++ b/patches/unapplied/server/0119-Properly-fix-item-duplication-bug.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Alfie Cleveland <[email protected]> +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 +index a06a2c5acb677b2495fab223dfbde293dffca096..8e127c36cbcb14d39de20217564ce1e722a57bcc 100644 +--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java ++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +@@ -2982,7 +2982,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { + + @Override + public boolean isImmobile() { +- return super.isImmobile() || !this.getBukkitEntity().isOnline(); ++ return super.isImmobile() || (this.connection != null && this.connection.isDisconnected()); // Paper - Fix duplication bugs + } + + @Override +diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +index d4527831f66bf1c55e6273c7f8923d6efbbf100f..04ada45eabd5a6c752c320cdff1a65c7ac83eb22 100644 +--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +@@ -191,7 +191,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + } + + public final boolean isDisconnected() { +- return !this.player.joining && !this.connection.isConnected(); ++ return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper - Fix duplication bugs + } + // CraftBukkit end + |