Paper/Spigot-Server-Patches/0355-Workaround-for-vehicle-tracking-issue-on-disconnect.patch
Zach Brown 70ce6ce831
Move version command update checking to the implementation
This makes it easier for downstream projects (forks) to replace the
version fetching system with their own. It is as simple as implementing
an interface and overriding the default implementation of
org.bukkit.UnsafeValues#getVersionFetcher()

It also makes it easier for us to organize things like the version
history feature.

Lastly I have updated the paper implementation to check against the site
API rather than against jenkins.
2019-05-27 04:13:41 -05:00

28 lines
1.0 KiB
Diff

From 0b348726ba58833452b50fc0d6e5ac8ce349c5a9 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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 79139be38..c7f22870b 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1280,6 +1280,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void n() {
this.ct = true;
this.ejectPassengers();
+
+ // Paper start - Workaround an issue where the vehicle doesn't track the passenger disconnection dismount.
+ if (this.isPassenger() && this.getVehicle() instanceof EntityPlayer) {
+ this.stopRiding();
+ }
+ // Paper end
+
if (this.isSleeping()) {
this.wakeup(true, false, false);
}
--
2.21.0