Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
25 Zeilen
1.2 KiB
Diff
25 Zeilen
1.2 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 3e0ddfe11d74ce47a023837b2ee472f0bc4c48c3..9cfd0b457f6c462921667b9439a7b3e32d019758 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -2078,6 +2078,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);
|
|
}
|