From 58ba4e379d9c47918c2a57ad0d718aa2aa57d6ff Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 29 Mar 2011 23:18:48 +0200 Subject: [PATCH] Add MONSTER to CreatureSpawnEvent By: Erik Broes --- .../bukkit/craftbukkit/event/CraftEventFactory.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 5e8bcc28d0..73b3a95907 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -8,6 +8,7 @@ import net.minecraft.server.EntityGhast; import net.minecraft.server.EntityGiantZombie; import net.minecraft.server.EntityHuman; import net.minecraft.server.EntityLiving; +import net.minecraft.server.EntityMonster; import net.minecraft.server.EntityPig; import net.minecraft.server.EntityPigZombie; import net.minecraft.server.EntitySheep; @@ -199,6 +200,8 @@ 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) { @@ -207,14 +210,14 @@ public class CraftEventFactory { type = CreatureType.SHEEP; } else if (entityliving instanceof EntitySkeleton) { type = CreatureType.SKELETON; - } else if (entityliving instanceof EntitySpider) { - type = CreatureType.SPIDER; - } else if (entityliving instanceof EntityZombie) { - type = CreatureType.ZOMBIE; } else if (entityliving instanceof EntitySlime) { type = CreatureType.SLIME; + } else if (entityliving instanceof EntitySpider) { + type = CreatureType.SPIDER; } else if (entityliving instanceof EntitySquid) { type = CreatureType.SQUID; + } else if (entityliving instanceof EntityZombie) { + type = CreatureType.ZOMBIE; } CreatureSpawnEvent event = new CreatureSpawnEvent(entity, type, entity.getLocation());