Fix horse equipping

This commit is contained in:
fullwall 2014-01-31 11:04:10 +08:00
parent 845ecd1df5
commit d7f483ccf9

View File

@ -39,8 +39,8 @@ import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_7_R1.CraftSound;
import org.bukkit.craftbukkit.v1_7_R1.CraftServer;
import org.bukkit.craftbukkit.v1_7_R1.CraftSound;
import org.bukkit.craftbukkit.v1_7_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftLivingEntity;
@ -287,7 +287,10 @@ public class NMS {
}
public static void openHorseScreen(Horse horse, Player equipper) {
((EntityHorse) getHandle(horse)).f((EntityHuman) NMS.getHandle(equipper));
boolean wasTamed = horse.isTamed();
horse.setTamed(true);
((EntityHorse) getHandle(horse)).a((EntityHuman) NMS.getHandle(equipper));
horse.setTamed(wasTamed);
}
public static void registerEntityClass(Class<?> clazz) {