mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-01 17:36:46 +01:00
Move default to own key section
This commit is contained in:
parent
fc935ce9dd
commit
66de4f7cab
@ -26,24 +26,24 @@ public class WorldConfig extends ConfigLoader {
|
||||
// World settings
|
||||
public boolean isSkillEnabled(SkillType skillType, String world) {
|
||||
String skill = StringUtils.getCapitalized(skillType.toString());
|
||||
return config.getBoolean("Worlds." + StringUtils.getCapitalized(world) + ".Skills." + skill + ".Enabled", isSkillEnabled(skill));
|
||||
return config.getBoolean("Worlds." + world + ".Skills." + skill + ".Enabled", isSkillEnabled(skill));
|
||||
}
|
||||
|
||||
public boolean isAbilityEnabled(SkillType skillType, String world) {
|
||||
String skill = StringUtils.getCapitalized(skillType.toString());
|
||||
return config.getBoolean("Worlds." + StringUtils.getCapitalized(world) + ".Skills." + skill + ".AbilityEnabled", isAbilityEnabled(skill));
|
||||
return config.getBoolean("Worlds." + world + ".Skills." + skill + ".AbilityEnabled", isAbilityEnabled(skill));
|
||||
}
|
||||
|
||||
public boolean isBlockStoreEnabled(String world) { return config.getBoolean("Worlds." + StringUtils.getCapitalized(world) + ".BlockStore", isBlockStoreEnabled()); }
|
||||
public boolean isBlockStoreEnabled(String world) { return config.getBoolean("Worlds." + world + ".BlockStore", isBlockStoreEnabled()); }
|
||||
|
||||
public boolean isMobHealthEnabled(String world) { return config.getBoolean("Worlds." + StringUtils.getCapitalized(world) + ".MobHealthBar", isMobHealthEnabled()); }
|
||||
public boolean isMobHealthEnabled(String world) { return config.getBoolean("Worlds." + world + ".MobHealthBar", isMobHealthEnabled()); }
|
||||
|
||||
// Default settings
|
||||
private boolean isSkillEnabled(String skill) { return config.getBoolean("Worlds.default.Skills." + skill + ".Enabled", true); }
|
||||
private boolean isSkillEnabled(String skill) { return config.getBoolean("Default.Skills." + skill + ".Enabled", true); }
|
||||
|
||||
private boolean isAbilityEnabled(String skill) { return config.getBoolean("Worlds.default.Skills." + skill + ".AbilityEnabled", true); }
|
||||
private boolean isAbilityEnabled(String skill) { return config.getBoolean("Default.Skills." + skill + ".AbilityEnabled", true); }
|
||||
|
||||
private boolean isBlockStoreEnabled() { return config.getBoolean("Worlds.default.BlockStore", true); }
|
||||
private boolean isBlockStoreEnabled() { return config.getBoolean("Default.BlockStore", true); }
|
||||
|
||||
private boolean isMobHealthEnabled() { return config.getBoolean("Worlds.default.MobHealthBar", true); }
|
||||
private boolean isMobHealthEnabled() { return config.getBoolean("Default.MobHealthBar", true); }
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
Worlds:
|
||||
## Copy the default section and replace 'default' with the name of a world to enable world specific settings for that world
|
||||
default:
|
||||
Default:
|
||||
Skills:
|
||||
Acrobatics:
|
||||
Enabled: true
|
||||
@ -37,3 +35,6 @@ Worlds:
|
||||
AbilityEnabled: true
|
||||
BlockStore: true
|
||||
MobHealthBar: true
|
||||
Worlds:
|
||||
ExampleWorldName:
|
||||
MobHealthBar: true
|
Loading…
Reference in New Issue
Block a user