Search in sources :

Example 1 with ColorSetting

use of me.wallhacks.spark.systems.setting.settings.ColorSetting 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);
}
Also used : ColorSetting(me.wallhacks.spark.systems.setting.settings.ColorSetting) BooleanSetting(me.wallhacks.spark.systems.setting.settings.BooleanSetting) IntSetting(me.wallhacks.spark.systems.setting.settings.IntSetting) DoubleSetting(me.wallhacks.spark.systems.setting.settings.DoubleSetting) Settings(baritone.api.Settings)

Aggregations

Settings (baritone.api.Settings)1 BooleanSetting (me.wallhacks.spark.systems.setting.settings.BooleanSetting)1 ColorSetting (me.wallhacks.spark.systems.setting.settings.ColorSetting)1 DoubleSetting (me.wallhacks.spark.systems.setting.settings.DoubleSetting)1 IntSetting (me.wallhacks.spark.systems.setting.settings.IntSetting)1