use of me.wallhacks.spark.systems.setting.settings.BooleanSetting in project Spark-Client by Spark-Client-Development.
the class BaritoneConfig method init.
public void init(Settings baritone) {
for (Settings.Setting bSetting : baritone.allSettings) {
if (bSetting.getType().equals(Boolean.class)) {
BooleanSetting s = new BooleanSetting(bSetting.getName(), this, (Boolean) bSetting.getValue(), bSetting.getCategory());
settingMap.put(s, bSetting);
} else if (bSetting.getType().equals(Color.class)) {
ColorSetting s = new ColorSetting(bSetting.getName(), this, (Color) bSetting.getValue(), bSetting.getCategory());
settingMap.put(s, bSetting);
} else if (bSetting instanceof Settings.DoubleSetting) {
DoubleSetting s = new DoubleSetting(bSetting.getName(), this, (Double) bSetting.getValue(), ((Settings.DoubleSetting) bSetting).min, ((Settings.DoubleSetting) bSetting).max, bSetting.getCategory());
settingMap.put(s, bSetting);
} else if (bSetting instanceof Settings.IntSetting) {
IntSetting s = new IntSetting(bSetting.getName(), this, (Integer) bSetting.getValue(), ((Settings.IntSetting) bSetting).min, ((Settings.IntSetting) bSetting).max, bSetting.getCategory());
settingMap.put(s, bSetting);
}
}
Spark.configManager.LoadFromConfig(Spark.configManager.getCurrentConfig(), true);
}
Aggregations