summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorGJ <gjmcferrin@gmail.com>2014-02-11 22:22:39 -0500
committerTravis Watkins <amaranth@ubuntu.com>2014-04-18 09:52:04 -0500
commitec41228fb50721e80470ee3253a30d16bb0a8a86 (patch)
tree75e70358627239d518d37521ca388388dd1933aa /src/main/java/org
parent81e560621fd0d8f8a7fb08a1eef627c83b7f5938 (diff)
downloadcraftbukkit-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/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java4
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();
}