From 0635f7c1b8b03c67bd3aa1a85514f7535cdf9168 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Wed, 30 Mar 2011 08:51:42 +0200 Subject: [PATCH] CreatureSpawnEvent: Fix forgotten inheritance with CreatureType --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 73b3a95907..e58fae0e75 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -200,8 +200,6 @@ public class CraftEventFactory { type = CreatureType.GHAST; } else if (entityliving instanceof EntityGiantZombie) { type = CreatureType.GIANT; - } else if (entityliving instanceof EntityMonster) { - type = CreatureType.MONSTER; } else if (entityliving instanceof EntityPig) { type = CreatureType.PIG; } else if (entityliving instanceof EntityPigZombie) { @@ -218,6 +216,9 @@ public class CraftEventFactory { type = CreatureType.SQUID; } else if (entityliving instanceof EntityZombie) { type = CreatureType.ZOMBIE; + // Supertype of many, last! + } else if (entityliving instanceof EntityMonster) { + type = CreatureType.MONSTER; } CreatureSpawnEvent event = new CreatureSpawnEvent(entity, type, entity.getLocation());