summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-03-30 08:51:42 +0200
committerErik Broes <erikbroes@grum.nl>2011-03-30 08:51:42 +0200
commit0635f7c1b8b03c67bd3aa1a85514f7535cdf9168 (patch)
treeb873342bfbb004251631014b3a1dcd76c5a1cbf2 /src/main/java
parente9cc4bbb0513fe34515893650bffd6bb7fd91e8b (diff)
downloadcraftbukkit-0635f7c1b8b03c67bd3aa1a85514f7535cdf9168.tar
craftbukkit-0635f7c1b8b03c67bd3aa1a85514f7535cdf9168.tar.gz
craftbukkit-0635f7c1b8b03c67bd3aa1a85514f7535cdf9168.tar.lz
craftbukkit-0635f7c1b8b03c67bd3aa1a85514f7535cdf9168.tar.xz
craftbukkit-0635f7c1b8b03c67bd3aa1a85514f7535cdf9168.zip
CreatureSpawnEvent: Fix forgotten inheritance with CreatureType
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java5
1 files 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 73b3a959..e58fae0e 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());