diff options
| author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-15 19:41:05 +0200 |
|---|---|---|
| committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-15 19:41:05 +0200 |
| commit | 8918d129525ace873e98840d9d4499e35c92dffe (patch) | |
| tree | d0dd7e5af3738ab52c20ac69de25f91b9149e7c4 /src/main/java/at/hannibal2/skyhanni/config | |
| parent | 2d923d222ebc58777dbf8523484f69a26313188c (diff) | |
| download | skyhanni-8918d129525ace873e98840d9d4499e35c92dffe.tar.gz skyhanni-8918d129525ace873e98840d9d4499e35c92dffe.tar.bz2 skyhanni-8918d129525ace873e98840d9d4499e35c92dffe.zip | |
added repo support
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/Features.java | 23 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java | 18 |
2 files changed, 34 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 4d81e8f01..4120d6581 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -13,7 +13,9 @@ import net.minecraft.client.Minecraft; public class Features { private void editOverlay(String activeConfig, int width, int height, Position position) { - Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {}, () -> {}, () -> SkyHanniMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(SkyHanniMod.feature, activeConfig)))); + Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> { + }, () -> { + }, () -> SkyHanniMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(SkyHanniMod.feature, activeConfig)))); } public void executeRunnable(String runnableId) { @@ -53,9 +55,6 @@ public class Features { } @Expose - public String apiKey = ""; - - @Expose @Category(name = "Chat", desc = "Chat related features.") public Chat chat = new Chat(); @@ -80,6 +79,10 @@ public class Features { public Misc misc = new Misc(); @Expose + @Category(name = "Apis", desc = "Api Data") + public ApiData apiData = new ApiData(); + + @Expose @Category(name = "Debug", desc = "Debug and test stuff.") public Debug debug = new Debug(); @@ -293,6 +296,18 @@ public class Features { public boolean configButtonOnPause = true; } + public static class ApiData { + + @Expose + public String apiKey = ""; + + @Expose + @ConfigOption(name = "Repo Auto Update", desc = "Update the repository on every startup.") + @ConfigEditorBoolean + public boolean repoAutoUpdate = true; + + } + public static class Debug { @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java index 74e65d0f8..8f3b798f1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java @@ -9,7 +9,7 @@ import org.apache.commons.lang3.StringUtils; public class Commands { - private static final SimpleCommand.ProcessCommandRunnable settingsRunnable = new SimpleCommand.ProcessCommandRunnable() { + private static final SimpleCommand.ProcessCommandRunnable mainMenu = new SimpleCommand.ProcessCommandRunnable() { public void processCommand(ICommandSender sender, String[] args) { if (args.length > 0) { SkyHanniMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(SkyHanniMod.feature, StringUtils.join(args, " "))); @@ -20,7 +20,19 @@ public class Commands { }; public static void init() { - ClientCommandHandler.instance.registerCommand(new SimpleCommand("sh", settingsRunnable)); - ClientCommandHandler.instance.registerCommand(new SimpleCommand("skyhanni", settingsRunnable)); + ClientCommandHandler.instance.registerCommand(new SimpleCommand("sh", mainMenu)); + ClientCommandHandler.instance.registerCommand(new SimpleCommand("skyhanni", mainMenu)); + + ClientCommandHandler.instance.registerCommand(new SimpleCommand("shreloadlocalrepo", new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + SkyHanniMod.repo.reloadLocalRepo(); + } + })); + + ClientCommandHandler.instance.registerCommand(new SimpleCommand("shupdaterepo", new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + SkyHanniMod.repo.updateRepo(); + } + })); } } |
