aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0272-Workaround-for-vehicle-tracking-issue-on-disconnect.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0272-Workaround-for-vehicle-tracking-issue-on-disconnect.patch')
-rw-r--r--patches/server/0272-Workaround-for-vehicle-tracking-issue-on-disconnect.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0272-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/patches/server/0272-Workaround-for-vehicle-tracking-issue-on-disconnect.patch
new file mode 100644
index 0000000000..a8477b1786
--- /dev/null
+++ b/patches/server/0272-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 bd130d3a4d0cfe431be627c3f4d85bb394fe099b..ad2b8ea068469f2b0597c0e0436ad3c94dcb62ea 100644
+--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
+@@ -1833,6 +1833,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
+ public void disconnect() {
+ this.disconnected = true;
+ this.ejectPassengers();
++
++ // Paper start - Workaround vehicle not tracking the passenger disconnection dismount
++ if (this.isPassenger() && this.getVehicle() instanceof ServerPlayer) {
++ this.stopRiding();
++ }
++ // Paper end - Workaround vehicle not tracking the passenger disconnection dismount
++
+ if (this.isSleeping()) {
+ this.stopSleepInBed(true, false);
+ }