2016-06-12 03:22:27 +00:00
|
|
|
From 887884dd866c1ec1c9f9c2e6de0099ee9ef1163b Mon Sep 17 00:00:00 2001
|
2016-04-10 08:24:54 +00:00
|
|
|
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
|
2016-06-12 03:22:27 +00:00
|
|
|
index e941f5f..e20c4ef 100644
|
2016-04-10 08:24:54 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2016-06-12 03:22:27 +00:00
|
|
|
@@ -582,6 +582,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2016-04-10 08:24:54 +00:00
|
|
|
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);
|
|
|
|
--
|
2016-06-09 03:57:14 +00:00
|
|
|
2.8.3
|
2016-04-10 08:24:54 +00:00
|
|
|
|