mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-13 02:11:05 +01:00
345a6a6205
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: ef0946409 PR-1091: Fix exit position in entity travel with portals d12768f75 PR-1090: Remove no longer needed world reference from CraftMerchantCustom 7550f6854 SPIGOT-7115: Support hex color codes in custom merchant inventory titles
24 lines
1.1 KiB
Diff
24 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 4c7634c84dc2cc42099c0457321d468166afa3bb..bea7a50c4e461eb69447f7f3b4b049e8dce66fd9 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1579,6 +1579,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);
|
|
}
|