mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-08 03:39:48 +01:00
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: connorhartley <vectrixu+gh@gmail.com>
|
|
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 140fdbdcc20b53d7dc3e1d4d027878d9d2db4ef7..4a4c9bcfa24e116aa242de2cc4291cf4480331b1 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1598,6 +1598,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);
|
|
}
|