13
0
geforkt von Mirrors/Paper
Paper/patches/server/0282-Workaround-for-vehicle-tracking-issue-on-disconnect.patch

25 Zeilen
1.1 KiB
Diff

2021-06-11 14:02:28 +02:00
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
2024-04-24 07:43:09 +02:00
index 05379ea4581db4277e6cc625ed0f3228bd0130fd..e5d8384830c83694a3560fc743dc38e645cf9cfd 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
2024-04-24 07:43:09 +02:00
@@ -1789,6 +1789,13 @@ public class ServerPlayer extends Player {
2021-06-11 14:02:28 +02:00
public void disconnect() {
this.disconnected = true;
this.ejectPassengers();
+
+ // Paper start - Workaround vehicle not tracking the passenger disconnection dismount
2021-06-11 14:02:28 +02:00
+ if (this.isPassenger() && this.getVehicle() instanceof ServerPlayer) {
+ this.stopRiding();
+ }
+ // Paper end - Workaround vehicle not tracking the passenger disconnection dismount
2021-06-11 14:02:28 +02:00
+
if (this.isSleeping()) {
this.stopSleepInBed(true, false);
}