summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-03-24 22:44:03 +0100
committerErik Broes <erikbroes@grum.nl>2011-03-24 22:44:03 +0100
commitce714ab329476d718da03b17604fad52f082122b (patch)
tree8a7bc863a0f68b49a65e6d3ac6f9a17176ffbb8b
parent93fff2d5f57ff2ad1ce9c28170b398c12fa5d585 (diff)
downloadcraftbukkit-ce714ab329476d718da03b17604fad52f082122b.tar
craftbukkit-ce714ab329476d718da03b17604fad52f082122b.tar.gz
craftbukkit-ce714ab329476d718da03b17604fad52f082122b.tar.lz
craftbukkit-ce714ab329476d718da03b17604fad52f082122b.tar.xz
craftbukkit-ce714ab329476d718da03b17604fad52f082122b.zip
Fix CreatureType of CreatureSpawn event
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c3dbd0d9..408022fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -190,29 +190,29 @@ public class CraftEventFactory {
CreatureType type = null;
- if (entity instanceof EntityChicken) {
+ if (entityliving instanceof EntityChicken) {
type = CreatureType.CHICKEN;
- } else if (entity instanceof EntityCow) {
+ } else if (entityliving instanceof EntityCow) {
type = CreatureType.COW;
- } else if (entity instanceof EntityCreeper) {
+ } else if (entityliving instanceof EntityCreeper) {
type = CreatureType.CREEPER;
- } else if (entity instanceof EntityGhast) {
+ } else if (entityliving instanceof EntityGhast) {
type = CreatureType.GHAST;
- } else if (entity instanceof EntityPig) {
+ } else if (entityliving instanceof EntityPig) {
type = CreatureType.PIG;
- } else if (entity instanceof EntityPigZombie) {
+ } else if (entityliving instanceof EntityPigZombie) {
type = CreatureType.PIG_ZOMBIE;
- } else if (entity instanceof EntitySheep) {
+ } else if (entityliving instanceof EntitySheep) {
type = CreatureType.SHEEP;
- } else if (entity instanceof EntitySkeleton) {
+ } else if (entityliving instanceof EntitySkeleton) {
type = CreatureType.SKELETON;
- } else if (entity instanceof EntitySheep) {
+ } else if (entityliving instanceof EntitySpider) {
type = CreatureType.SPIDER;
- } else if (entity instanceof EntityZombie) {
+ } else if (entityliving instanceof EntityZombie) {
type = CreatureType.ZOMBIE;
- } else if (entity instanceof EntitySlime) {
+ } else if (entityliving instanceof EntitySlime) {
type = CreatureType.SLIME;
- } else if (entity instanceof EntitySquid) {
+ } else if (entityliving instanceof EntitySquid) {
type = CreatureType.SQUID;
}