Search in sources :

Example 1 with BindSetting

use of me.earth.earthhack.api.setting.settings.BindSetting in project 3arthh4ck by 3arthqu4ke.

the class HudValuePreset method snapshot.

public static HudValuePreset snapshot(String name, HudElement module) {
    HudValuePreset preset = new HudValuePreset(name, module, "A config Preset.");
    for (Setting<?> setting : module.getSettings()) {
        if (setting instanceof BindSetting) {
            continue;
        }
        JsonElement element = Jsonable.parse(setting.toJson());
        preset.getValues().put(setting.getName(), element);
    }
    return preset;
}
Also used : JsonElement(com.google.gson.JsonElement) BindSetting(me.earth.earthhack.api.setting.settings.BindSetting)

Example 2 with BindSetting

use of me.earth.earthhack.api.setting.settings.BindSetting in project 3arthh4ck by 3arthqu4ke.

the class ValuePreset method snapshot.

public static ValuePreset snapshot(String name, Module module) {
    ValuePreset preset = new ValuePreset(name, module, "A config Preset.");
    for (Setting<?> setting : module.getSettings()) {
        if (setting instanceof BindSetting) {
            continue;
        }
        JsonElement element = Jsonable.parse(setting.toJson());
        preset.getValues().put(setting.getName(), element);
    }
    return preset;
}
Also used : JsonElement(com.google.gson.JsonElement) BindSetting(me.earth.earthhack.api.setting.settings.BindSetting)

Aggregations

JsonElement (com.google.gson.JsonElement)2 BindSetting (me.earth.earthhack.api.setting.settings.BindSetting)2