diff options
author | Torui <44932079+ToruiDev@users.noreply.github.com> | 2022-05-21 16:11:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-21 16:11:01 +0200 |
commit | b9b1294882b68e2d85aec0c1d28570f5d68359b9 (patch) | |
tree | 599b996aa7844a4bc9d989d75f879c5a065e6c55 /src/main/java/de/torui/coflsky/configuration | |
parent | 4a85bf6754c101b43d2d0d3a6c9ed5744dd0308d (diff) | |
download | COFL-b9b1294882b68e2d85aec0c1d28570f5d68359b9.tar.gz COFL-b9b1294882b68e2d85aec0c1d28570f5d68359b9.tar.bz2 COFL-b9b1294882b68e2d85aec0c1d28570f5d68359b9.zip |
initial implementation (#38)
* 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 <xekwavx@gmail.com>
Diffstat (limited to 'src/main/java/de/torui/coflsky/configuration')
-rw-r--r-- | src/main/java/de/torui/coflsky/configuration/Configuration.java | 5 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/configuration/LocalConfig.java | 6 |
2 files changed, 7 insertions, 4 deletions
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); } } |