From ec41228fb50721e80470ee3253a30d16bb0a8a86 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 11 Feb 2014 22:22:39 -0500 Subject: [PATCH] [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(+) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index a4ede348ff..4590a713e6 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(); }