mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
36 lines
1.7 KiB
Diff
36 lines
1.7 KiB
Diff
|
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
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||
|
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player implements ContainerListener {
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
- public boolean isImmobile() {
|
||
|
- return super.isImmobile() || !getBukkitEntity().isOnline();
|
||
|
+ protected boolean isImmobile() {
|
||
|
+ 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
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerGamePacketListener {
|
||
|
}
|
||
|
|
||
|
public final boolean isDisconnected() {
|
||
|
- return !this.player.joining && !this.connection.isConnected();
|
||
|
+ return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
||
|
}
|
||
|
// CraftBukkit end
|
||
|
|