Sorted out NPE with distributions

This commit is contained in:
Garbage Mule
2011-07-10 21:19:47 +02:00
parent 397a17a185
commit 620ee884cb
2 changed files with 2 additions and 3 deletions
BIN
View File
Binary file not shown.
+2 -3
View File
@@ -250,12 +250,11 @@ public class MAUtils
{ {
String arenaPath = "arenas." + arena + ".waves." + wave; String arenaPath = "arenas." + arena + ".waves." + wave;
Map<String,Integer> result = new HashMap<String,Integer>(); Map<String,Integer> result = new HashMap<String,Integer>();
List<String> dists = config.getKeys(arenaPath); List<String> dists = (config.getKeys(arenaPath) != null) ? config.getKeys(arenaPath) : new LinkedList<String>();
boolean update = false;
String[] monsters = (wave.equals("default")) ? new String[]{"zombies", "skeletons", "spiders", "creepers", "wolves"} String[] monsters = (wave.equals("default")) ? new String[]{"zombies", "skeletons", "spiders", "creepers", "wolves"}
: new String[]{"powered-creepers", "zombie-pigmen", "slimes", "humans", "angry-wolves", "giants", "ghasts"}; : new String[]{"powered-creepers", "zombie-pigmen", "slimes", "humans", "angry-wolves", "giants", "ghasts"};
boolean update = false;
for (String monster : monsters) for (String monster : monsters)
{ {
if (dists.contains(monster)) if (dists.contains(monster))