geforkt von Mirrors/Paper
34 Zeilen
1.7 KiB
Diff
34 Zeilen
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 b117a98dea77755bee33f8a141f8df16b587beeb..8f4b8e4911d5c3bb82c9ac246c041c0eb51a3123 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -2189,7 +2189,7 @@ public class ServerPlayer extends Player {
|
|
|
|
@Override
|
|
public boolean isImmobile() {
|
|
- return super.isImmobile() || !this.getBukkitEntity().isOnline();
|
|
+ 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 50759c53b46b913ac7ff56476d2a49163e54fff4..44daf6210786748f44275a97ecebbd191837b5e5 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -3252,7 +3252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
}
|
|
|
|
public final boolean isDisconnected() {
|
|
- return !this.player.joining && !this.connection.isConnected();
|
|
+ return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
|
}
|
|
// CraftBukkit end
|
|
|