Store config values for direct access

This commit is contained in:
KennyTV 2019-12-24 09:57:11 +01:00
parent 35f531d051
commit de2c3b3719

View File

@ -8,15 +8,27 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
public final class ViaBackwardsConfig extends Config implements nl.matsv.viabackwards.api.ViaBackwardsConfig {
public class ViaBackwardsConfig extends Config implements nl.matsv.viabackwards.api.ViaBackwardsConfig {
private boolean addCustomEnchantsToLore;
public ViaBackwardsConfig(File configFile) {
super(configFile);
}
@Override
public void reloadConfig() {
super.reloadConfig();
loadFields();
}
private void loadFields() {
addCustomEnchantsToLore = getBoolean("add-custom-enchants-into-lore", true);
}
@Override
public boolean addCustomEnchantsToLore() {
return getBoolean("add-custom-enchants-into-lore", true);
return addCustomEnchantsToLore;
}
@Override