From dc0121509a942040ef76a9d6b7177164a0c0b6f1 Mon Sep 17 00:00:00 2001 From: "main()" Date: Thu, 12 Jan 2012 19:01:10 +0100 Subject: [PATCH] Fixed shouldWeKillThisCreature() in MVEntityListener. --- .../MultiverseCore/listeners/MVEntityListener.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVEntityListener.java b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVEntityListener.java index f01b8949..f393bbde 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVEntityListener.java +++ b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVEntityListener.java @@ -124,7 +124,7 @@ public class MVEntityListener extends EntityListener { } else if (creatureList.isEmpty()) { // 2. There are no exceptions and animals are NOT allowed. Kill it. return true; - } else if (creatureList.contains(creature) && allowCreatureSpawning) { + } else if (creatureList.contains(creature.toUpperCase()) && allowCreatureSpawning) { // 3. There ARE exceptions and animals ARE allowed. Kill it. return true; } else if (!creatureList.contains(creature.toUpperCase()) && allowCreatureSpawning) { @@ -136,9 +136,10 @@ public class MVEntityListener extends EntityListener { } else if (!creatureList.contains(creature.toUpperCase()) && !allowCreatureSpawning) { // 6. Animals are NOT allowed to spawn, and this creature is not in the save list... KILL IT return true; + } else { + // This code should NEVER execute. I just left the verbose conditions in right now. + throw new UnsupportedOperationException(); } - // This code should NEVER execute. I just left the verbose conditions in right now. - return false; } }