From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown 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 885d5dd984f2d7d8d662d6b6546eacd0879a2e54..1ac65af16a835f4c601d044412fc06ab9694eaf5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -917,6 +917,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().connection.send(new net.minecraft.network.protocol.game.ClientboundSetPassengersPacket(this.getHandle())); + } + return wasSet; + } + // Paper end + @Override public void setSneaking(boolean sneak) { this.getHandle().setShiftKeyDown(sneak);