Search in sources :

Example 6 with Mod

use of net.wurstclient.features.Mod in project Wurst-MC-1.12 by Wurst-Imperium.

the class ModsConfig method loadFromJson.

@Override
protected void loadFromJson(JsonElement json) {
    for (Entry<String, JsonElement> entry : json.getAsJsonObject().entrySet()) {
        Mod mod = WurstClient.INSTANCE.mods.getModByName(entry.getKey());
        if (mod == null || !mod.isStateSaved())
            continue;
        JsonObject jsonMod = entry.getValue().getAsJsonObject();
        if (jsonMod.get("enabled").getAsBoolean())
            mod.enableOnStartup();
    }
}
Also used : Mod(net.wurstclient.features.Mod) JsonElement(com.google.gson.JsonElement) JsonObject(com.google.gson.JsonObject)

Aggregations

Mod (net.wurstclient.features.Mod)6 JsonObject (com.google.gson.JsonObject)2 JsonElement (com.google.gson.JsonElement)1 Rectangle (java.awt.Rectangle)1 HashMap (java.util.HashMap)1 TreeMap (java.util.TreeMap)1 GuiButton (net.minecraft.client.gui.GuiButton)1 KeyPressEvent (net.wurstclient.events.KeyPressListener.KeyPressEvent)1 Cmd (net.wurstclient.features.Cmd)1 Feature (net.wurstclient.features.Feature)1 Spf (net.wurstclient.features.Spf)1 Keybind (net.wurstclient.keybinds.KeybindList.Keybind)1 NavigatorNewKeybindScreen (net.wurstclient.keybinds.NavigatorNewKeybindScreen)1 NavigatorRemoveKeybindScreen (net.wurstclient.keybinds.NavigatorRemoveKeybindScreen)1 PossibleKeybind (net.wurstclient.keybinds.PossibleKeybind)1 CheckboxSetting (net.wurstclient.settings.CheckboxSetting)1 Setting (net.wurstclient.settings.Setting)1 SliderSetting (net.wurstclient.settings.SliderSetting)1