geforkt von Mirrors/Paper
30 Zeilen
1.2 KiB
Diff
30 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 35c6c4871f21157fe349e87cb8fd0d5ab77a8c2a..c1205594a8da1a28ac9ee30d1d70f1011f0a2327 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -791,6 +791,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().playerConnection.sendPacket(new net.minecraft.server.PacketPlayOutMount(this.getHandle()));
|
|
+ }
|
|
+ return wasSet;
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public void setSneaking(boolean sneak) {
|
|
getHandle().setSneaking(sneak);
|