2019-07-17 06:09:32 +08:00
|
|
|
From c2cf15f3bb28ed63f7ba3e882b98cccd64630e95 Mon Sep 17 00:00:00 2001
|
2018-07-15 09:53:17 +08: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
|
2019-07-17 06:09:32 +08:00
|
|
|
index d0d61fd29..57f2499ca 100644
|
2018-07-15 09:53:17 +08:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2019-06-25 09:47:58 +08:00
|
|
|
@@ -764,6 +764,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2018-07-15 09:53:17 +08: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);
|
|
|
|
--
|
2019-06-25 09:47:58 +08:00
|
|
|
2.22.0
|
2018-07-15 09:53:17 +08:00
|
|
|
|