From ec41228fb50721e80470ee3253a30d16bb0a8a86 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 11 Feb 2014 22:22:39 -0500 Subject: [Bleeding] Ensure skeletons spawn with equipment. Fixes BUKKIT-2836 Previously, when a skeleton was spawned via the spawn(...) function, the resulting skeleton had no equipped bow and therefore could not properly attack. This fix gives all skeletons the proper equipment and ensures that they are able to attack. --- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index a4ede348..4590a713 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1032,6 +1032,10 @@ public class CraftWorld implements World { } if (entity != null) { + if (entity instanceof EntityInsentient) { + ((EntityInsentient) entity).a((GroupDataEntity) null); // Should be prepare? + } + world.addEntity(entity, reason); return (T) entity.getBukkitEntity(); } -- cgit v1.2.3