From 2b25ca2932d9a0d72f4651cf77a8895045f97a98 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 21:43:24 +0000 Subject: [PATCH] CME --- Essentials/src/com/earth2me/essentials/Mob.java | 3 ++- .../src/com/earth2me/essentials/commands/Commandspawnmob.java | 2 +- 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 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 availableList = Mob.getMobList(); + final Set availableList = Mob.getMobList(); for (String mob : availableList) { if (!user.isAuthorized("essentials.spawnmob." + mob.toLowerCase()))