diff options
author | GJ <gjmcferrin@gmail.com> | 2014-02-11 22:22:39 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-18 09:52:04 -0500 |
commit | ec41228fb50721e80470ee3253a30d16bb0a8a86 (patch) | |
tree | 75e70358627239d518d37521ca388388dd1933aa /src | |
parent | 81e560621fd0d8f8a7fb08a1eef627c83b7f5938 (diff) | |
download | craftbukkit-ec41228fb50721e80470ee3253a30d16bb0a8a86.tar craftbukkit-ec41228fb50721e80470ee3253a30d16bb0a8a86.tar.gz craftbukkit-ec41228fb50721e80470ee3253a30d16bb0a8a86.tar.lz craftbukkit-ec41228fb50721e80470ee3253a30d16bb0a8a86.tar.xz craftbukkit-ec41228fb50721e80470ee3253a30d16bb0a8a86.zip |
[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.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 4 |
1 files changed, 4 insertions, 0 deletions
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(); } |