From b9b1294882b68e2d85aec0c1d28570f5d68359b9 Mon Sep 17 00:00:00 2001 From: Torui <44932079+ToruiDev@users.noreply.github.com> Date: Sat, 21 May 2022 16:11:01 +0200 Subject: initial implementation (#38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rewrite everything * Add replace and insert methods for tooltips * Add sleep bcz hypixel doesnt want a prefilled chest * Commit requested changes * Fix messed up item stacks for stackables * Move handlers to handlers package * Empty hashmap on gui close * merge conflixt fix * Fix index out of bound exception * Fix bcz forge * fix messed slot assigns when there is empoty inventory slot * Make tooltips respect mod settings * Fix typo * save tab contents * optimise description loading & fix tab Co-authored-by: HackedOS <63157139+HackedOS@users.noreply.github.com> Co-authored-by: Äkwav --- src/main/java/de/torui/coflsky/configuration/Configuration.java | 5 +++-- src/main/java/de/torui/coflsky/configuration/LocalConfig.java | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/de/torui/coflsky/configuration') diff --git a/src/main/java/de/torui/coflsky/configuration/Configuration.java b/src/main/java/de/torui/coflsky/configuration/Configuration.java index 1ef040f..58ca4fd 100644 --- a/src/main/java/de/torui/coflsky/configuration/Configuration.java +++ b/src/main/java/de/torui/coflsky/configuration/Configuration.java @@ -1,7 +1,7 @@ package de.torui.coflsky.configuration; import de.torui.coflsky.CoflSky; -import de.torui.coflsky.EventRegistry; +import de.torui.coflsky.handlers.EventRegistry; import java.util.regex.Pattern; @@ -21,6 +21,7 @@ public class Configuration { public static void setInstance(Configuration config) { instance = config; CoflSky.config.autoStart = instance.autoStart; + CoflSky.config.extendedtooltips = instance.extendDescriptions; EventRegistry.chatpattern = Pattern.compile(instance.chatRegex, Pattern.CASE_INSENSITIVE);; } @@ -36,7 +37,7 @@ public class Configuration { public boolean collectEntities; public boolean autoStart; @Description("Wherever or not to send item descriptions for extending to the server") - public boolean ExtendDescriptions; + public boolean extendDescriptions; @Description("Chat input starting with one of these prefixes is sent to the server") public String[] CommandPrefixes; diff --git a/src/main/java/de/torui/coflsky/configuration/LocalConfig.java b/src/main/java/de/torui/coflsky/configuration/LocalConfig.java index 28909c4..5c16fca 100644 --- a/src/main/java/de/torui/coflsky/configuration/LocalConfig.java +++ b/src/main/java/de/torui/coflsky/configuration/LocalConfig.java @@ -11,8 +11,10 @@ import java.nio.file.Paths; public class LocalConfig { public boolean autoStart; - public LocalConfig(boolean autoStart) { + public boolean extendedtooltips; + public LocalConfig(boolean autoStart,boolean extendedtooltips) { this.autoStart = autoStart; + this.extendedtooltips = extendedtooltips; } public static void saveConfig(File file, LocalConfig Config) { Gson gson = new Gson(); @@ -28,6 +30,6 @@ public class LocalConfig { } public static LocalConfig createDefaultConfig() { - return new LocalConfig(false); + return new LocalConfig(false,true); } } -- cgit