mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From 4eddf67039422c5c5b56b11ec90359c231ad5e31 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Sun, 10 Apr 2016 03:23:32 -0500
|
|
Subject: [PATCH] Workaround for setting passengers on players
|
|
|
|
SPIGOT-1915 & GH-114
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
index e1d34d46d..6e2773cbb 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -628,6 +628,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
return true;
|
|
}
|
|
|
|
+ // Paper start - Ugly workaround for SPIGOT-1915 & GH-114
|
|
+ @Override
|
|
+ public boolean setPassenger(org.bukkit.entity.Entity passenger) {
|
|
+ boolean wasSet = super.setPassenger(passenger);
|
|
+ if (wasSet) {
|
|
+ this.getHandle().playerConnection.sendPacket(new net.minecraft.server.PacketPlayOutMount(this.getHandle()));
|
|
+ }
|
|
+ return wasSet;
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public void setSneaking(boolean sneak) {
|
|
getHandle().setSneaking(sneak);
|
|
--
|
|
2.18.0
|
|
|