summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-03-04 21:43:24 +0000
committerKHobbits <rob@khobbits.co.uk>2012-03-05 08:37:14 +0000
commit2b25ca2932d9a0d72f4651cf77a8895045f97a98 (patch)
tree792a4067b21a228a488b0670f5eaa16bc72c6b1b
parentc7a6677d528a92e4820e297cb08bcbe642c5c6ae (diff)
downloadEssentials-2b25ca2932d9a0d72f4651cf77a8895045f97a98.tar
Essentials-2b25ca2932d9a0d72f4651cf77a8895045f97a98.tar.gz
Essentials-2b25ca2932d9a0d72f4651cf77a8895045f97a98.tar.lz
Essentials-2b25ca2932d9a0d72f4651cf77a8895045f97a98.tar.xz
Essentials-2b25ca2932d9a0d72f4651cf77a8895045f97a98.zip
CME
-rw-r--r--Essentials/src/com/earth2me/essentials/Mob.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java
index 7be698950..8523a1a87 100644
--- a/Essentials/src/com/earth2me/essentials/Mob.java
+++ b/Essentials/src/com/earth2me/essentials/Mob.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -71,7 +72,7 @@ public enum Mob
}
public static Set<String> getMobList() {
- return hashMap.keySet();
+ return Collections.unmodifiableSet(hashMap.keySet());
}
public LivingEntity spawn(final Player player, final Server server, final Location loc) throws MobException
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
index 4971c7922..5c0dc84fe 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
@@ -27,7 +27,7 @@ public class Commandspawnmob extends EssentialsCommand
{
if (args.length < 1)
{
- Set<String> availableList = Mob.getMobList();
+ final Set<String> availableList = Mob.getMobList();
for (String mob : availableList)
{
if (!user.isAuthorized("essentials.spawnmob." + mob.toLowerCase()))