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 b3af35120834a907ca05aa98f43d5b4be7f2248d..6d723445f80fc6db5880f658098046de5f13f563 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1539,6 +1539,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); }