summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-09-17 19:50:57 +0200
committersnowleo <schneeleo@gmail.com>2011-09-17 19:50:57 +0200
commitac1729af37d7341f84fc57994372ffc5d743ed03 (patch)
tree6329451e13f100f5508a642dafb21d295a542a27
parent45f7ee08f2324ef86d99e69396ef56171fd0b45e (diff)
downloadEssentials-ac1729af37d7341f84fc57994372ffc5d743ed03.tar
Essentials-ac1729af37d7341f84fc57994372ffc5d743ed03.tar.gz
Essentials-ac1729af37d7341f84fc57994372ffc5d743ed03.tar.lz
Essentials-ac1729af37d7341f84fc57994372ffc5d743ed03.tar.xz
Essentials-ac1729af37d7341f84fc57994372ffc5d743ed03.zip
New animals for spawner and spawnmob
-rw-r--r--Essentials/src/com/earth2me/essentials/Mob.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawner.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java7
3 files changed, 10 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java
index 5ada086d9..df4a5b72f 100644
--- a/Essentials/src/com/earth2me/essentials/Mob.java
+++ b/Essentials/src/com/earth2me/essentials/Mob.java
@@ -27,7 +27,10 @@ public enum Mob
SQUID("Squid", Enemies.FRIENDLY, CreatureType.SQUID),
ZOMBIE("Zombie", Enemies.ENEMY, CreatureType.ZOMBIE),
MONSTER("Monster", Enemies.ENEMY, CreatureType.MONSTER),
- WOLF("Wolf", Enemies.NEUTRAL, CreatureType.WOLF);
+ WOLF("Wolf", Enemies.NEUTRAL, CreatureType.WOLF),
+ CAVESPIDER("CaveSpider", Enemies.ENEMY, CreatureType.CAVE_SPIDER),
+ ENDERMAN("Enderman", Enemies.ENEMY, CreatureType.ENDERMAN),
+ SILVERFISH("Silverfish", Enemies.ENEMY, CreatureType.SILVERFISH);
public static final Logger logger = Logger.getLogger("Minecraft");
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
index d3b14970a..18e4fb349 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
@@ -34,8 +34,8 @@ public class Commandspawner extends EssentialsCommand
try
{
String name = args[0];
- name = name.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(name);
-
+ name = name.equalsIgnoreCase("CaveSpider") ? "CaveSpider" : name.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(name);
+
Mob mob = null;
mob = Mob.fromName(name);
if (mob == null)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
index 87a22c59f..f46264582 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
@@ -37,7 +37,7 @@ public class Commandspawnmob extends EssentialsCommand
String[] mountparts = args[0].split(",");
String[] parts = mountparts[0].split(":");
String mobType = parts[0];
- mobType = mobType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mobType);
+ mobType = mobType.equalsIgnoreCase("CaveSpider") ? "CaveSpider" : mobType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mobType);
String mobData = null;
if (parts.length == 2)
{
@@ -49,7 +49,7 @@ public class Commandspawnmob extends EssentialsCommand
{
parts = mountparts[1].split(":");
mountType = parts[0];
- mountType = mountType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mountType);
+ mountType = mountType.equalsIgnoreCase("CaveSpider") ? "CaveSpider" : mountType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mountType);
if (parts.length == 2)
{
mountData = parts[1];
@@ -77,7 +77,8 @@ public class Commandspawnmob extends EssentialsCommand
8, 9
};
Block block = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock();
- if(block == null) {
+ if (block == null)
+ {
user.sendMessage(Util.i18n("unableToSpawnMob"));
return;
}