From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: connorhartley 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 74da4c332045cb749104f2bc573e3116df91d01f..8fa241f2f229a8b0950bc1f8a7de61a02bc1020c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1799,6 +1799,13 @@ public class ServerPlayer extends 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); }