diff options
Diffstat (limited to 'patches/server/0294-Workaround-for-vehicle-tracking-issue-on-disconnect.patch')
-rw-r--r-- | patches/server/0294-Workaround-for-vehicle-tracking-issue-on-disconnect.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0294-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/patches/server/0294-Workaround-for-vehicle-tracking-issue-on-disconnect.patch new file mode 100644 index 0000000000..699bb74caa --- /dev/null +++ b/patches/server/0294-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: connorhartley <[email protected]> +Date: Mon, 7 Jan 2019 14:43:48 -0600 +Subject: [PATCH] Workaround for vehicle tracking issue on disconnect + + +diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java +index e8ca0d8612e132fac5533b7672d0fccbf1bc9e24..f45e8b4a536d0cef9b295083f95a556b87fcd2fc 100644 +--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java ++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +@@ -1578,6 +1578,13 @@ public class ServerPlayer extends Player { + public void disconnect() { + this.disconnected = true; + this.ejectPassengers(); ++ ++ // Paper start - Workaround an issue where the vehicle doesn't track the passenger disconnection dismount. ++ if (this.isPassenger() && this.getVehicle() instanceof ServerPlayer) { ++ this.stopRiding(); ++ } ++ // Paper end ++ + if (this.isSleeping()) { + this.stopSleepInBed(true, false); + } |