2018-10-05 05:31:01 +02:00
|
|
|
From b13e3ba091cb6b577876dc9e7ee44ab7b96081b1 Mon Sep 17 00:00:00 2001
|
2018-07-15 03:53:17 +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
|
2018-09-29 01:31:59 +02:00
|
|
|
index c575fb933c..3337d8c8e4 100644
|
2018-07-15 03:53:17 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2018-09-01 12:09:13 +02:00
|
|
|
@@ -724,6 +724,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2018-07-15 03:53:17 +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);
|
|
|
|
--
|
2018-09-29 01:31:59 +02:00
|
|
|
2.19.0
|
2018-07-15 03:53:17 +02:00
|
|
|
|