mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Merge pull request #2694 from Maximvdw/patch-1
Fixed NPE when skill is not in config
This commit is contained in:
commit
1488946fc5
@ -451,6 +451,8 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public boolean getDoubleDropsDisabled(SkillType skill) {
|
public boolean getDoubleDropsDisabled(SkillType skill) {
|
||||||
String skillName = StringUtils.getCapitalized(skill.toString());
|
String skillName = StringUtils.getCapitalized(skill.toString());
|
||||||
ConfigurationSection section = config.getConfigurationSection("Double_Drops." + skillName);
|
ConfigurationSection section = config.getConfigurationSection("Double_Drops." + skillName);
|
||||||
|
if (section == null)
|
||||||
|
return false;
|
||||||
Set<String> keys = section.getKeys(false);
|
Set<String> keys = section.getKeys(false);
|
||||||
boolean disabled = true;
|
boolean disabled = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user