summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 656ed6bc1..38c11a81a 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;
@@ -73,7 +74,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 5c118eaaa..27a9d3d3a 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()))