diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-03-04 21:43:24 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-03-04 21:43:24 +0000 |
commit | a75eefcdd47f50292fe2ca4d3d8740ebc10b253b (patch) | |
tree | 83651bebee4635f49021d45567b9175e5ffda6b9 | |
parent | 6a9027da6d7cd2c2c0c35f0163dc0207720708e6 (diff) | |
download | Essentials-a75eefcdd47f50292fe2ca4d3d8740ebc10b253b.tar Essentials-a75eefcdd47f50292fe2ca4d3d8740ebc10b253b.tar.gz Essentials-a75eefcdd47f50292fe2ca4d3d8740ebc10b253b.tar.lz Essentials-a75eefcdd47f50292fe2ca4d3d8740ebc10b253b.tar.xz Essentials-a75eefcdd47f50292fe2ca4d3d8740ebc10b253b.zip |
CME
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Mob.java | 3 | ||||
-rw-r--r-- | Essentials/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 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())) |