mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2025-03-13 13:39:20 +01:00
Store config values for direct access
This commit is contained in:
parent
35f531d051
commit
de2c3b3719
@ -8,15 +8,27 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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) {
|
public ViaBackwardsConfig(File configFile) {
|
||||||
super(configFile);
|
super(configFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reloadConfig() {
|
||||||
|
super.reloadConfig();
|
||||||
|
loadFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadFields() {
|
||||||
|
addCustomEnchantsToLore = getBoolean("add-custom-enchants-into-lore", true);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addCustomEnchantsToLore() {
|
public boolean addCustomEnchantsToLore() {
|
||||||
return getBoolean("add-custom-enchants-into-lore", true);
|
return addCustomEnchantsToLore;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user