2017-04-29 12:27:31 +02:00
|
|
|
From e5988d5b1cd40ac1a8b4fa2868e5214516b99c73 Mon Sep 17 00:00:00 2001
|
2016-04-10 10:24:54 +02: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
|
2017-04-29 12:27:31 +02:00
|
|
|
index 0a9e8b9cd..8e06c2140 100644
|
2016-04-10 10:24:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2017-02-18 03:03:38 +01:00
|
|
|
@@ -589,6 +589,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2016-04-10 10:24:54 +02: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);
|
|
|
|
--
|
2017-04-29 12:27:31 +02:00
|
|
|
2.12.2.windows.2
|
2016-04-10 10:24:54 +02:00
|
|
|
|