2020-10-12 21:40:54 +02:00
|
|
|
package com.gmail.nossr50.config;
|
|
|
|
|
|
|
|
import com.gmail.nossr50.util.compat.layers.persistentdata.MobMetaFlagType;
|
|
|
|
|
|
|
|
public class PersistentDataConfig extends AutoUpdateConfigLoader {
|
|
|
|
private static PersistentDataConfig instance;
|
|
|
|
|
|
|
|
private PersistentDataConfig() {
|
2020-10-12 21:50:18 +02:00
|
|
|
super("persistent_data.yml");
|
2020-10-12 21:40:54 +02:00
|
|
|
validate();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static PersistentDataConfig getInstance() {
|
|
|
|
if (instance == null) {
|
|
|
|
instance = new PersistentDataConfig();
|
|
|
|
}
|
|
|
|
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void loadKeys() {
|
|
|
|
//Sigh this old config system...
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected boolean validateKeys() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Persistent Data Toggles
|
|
|
|
public boolean isMobPersistent(MobMetaFlagType mobMetaFlagType) {
|
|
|
|
String key = "Persistent_Data.Mobs.Flags." + mobMetaFlagType.toString() + ".Saved_To_Disk";
|
|
|
|
return config.getBoolean(key, false);
|
|
|
|
}
|
2020-10-12 21:50:18 +02:00
|
|
|
|
2020-10-12 21:40:54 +02:00
|
|
|
}
|