mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-30 14:43:52 +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
|
name: MobArena
|
||||||
author: garbagemule
|
author: garbagemule
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.96.2.3
|
version: 0.96.2.4
|
||||||
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
|
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
|
||||||
commands:
|
commands:
|
||||||
ma:
|
ma:
|
||||||
|
@ -318,7 +318,12 @@ public class WaveParser
|
|||||||
* @return a "reverse" map of monsters and numbers
|
* @return a "reverse" map of monsters and numbers
|
||||||
*/
|
*/
|
||||||
private static SortedMap<Integer,MACreature> getMonsterMap(ConfigurationSection config) {
|
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()) {
|
if (monsters == null || monsters.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user