mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-30 06:33:55 +01:00
Fix NPE on missing, but expected, monster maps.
This commit is contained in:
parent
d866ec50af
commit
97e5dd0b63
@ -1,7 +1,7 @@
|
||||
name: MobArena
|
||||
author: garbagemule
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.96.2.3
|
||||
version: 0.96.2.4
|
||||
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
|
||||
commands:
|
||||
ma:
|
||||
|
@ -318,7 +318,12 @@ public class WaveParser
|
||||
* @return a "reverse" map of monsters and numbers
|
||||
*/
|
||||
private static SortedMap<Integer,MACreature> getMonsterMap(ConfigurationSection config) {
|
||||
Set<String> monsters = config.getConfigurationSection("monsters").getKeys(false);
|
||||
ConfigurationSection section = config.getConfigurationSection("monsters");
|
||||
if (section == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Set<String> monsters = section.getKeys(false);
|
||||
if (monsters == null || monsters.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user