diff options
| author | bowser0000 <bowser0000@gmail.com> | 2021-04-29 01:06:57 -0400 |
|---|---|---|
| committer | bowser0000 <bowser0000@gmail.com> | 2021-04-29 01:06:57 -0400 |
| commit | 01822bff56d23b98885227943bd1e042e4f9e946 (patch) | |
| tree | 5931c2b8a3df8ca25a5747fdc273a06c6102fa48 /src/main/java/me/Danker/handlers | |
| parent | b48dabaf8ab58773eb51a1c2077b880ee1f28675 (diff) | |
| download | SkyblockMod-01822bff56d23b98885227943bd1e042e4f9e946.tar.gz SkyblockMod-01822bff56d23b98885227943bd1e042e4f9e946.tar.bz2 SkyblockMod-01822bff56d23b98885227943bd1e042e4f9e946.zip | |
Add giant hp display
Also make LocationButton easy to add
Diffstat (limited to 'src/main/java/me/Danker/handlers')
| -rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index dcb2368..a200b01 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -105,9 +105,7 @@ public class ConfigHandler { } public static void writeDoubleConfig(String category, String key, double value) { - config = new Configuration(new File(file)); try { - config.load(); double set = config.get(category, key, value).getDouble(); config.getCategory(category).get(key).set(value); } catch (Exception ex) { @@ -131,9 +129,7 @@ public class ConfigHandler { } public static void writeBooleanConfig(String category, String key, boolean value) { - config = new Configuration(new File(file)); try { - config.load(); boolean set = config.get(category, key, value).getBoolean(); config.getCategory(category).get(key).set(value); } catch (Exception ex) { @@ -208,6 +204,8 @@ public class ConfigHandler { } public static void reloadConfig() { + init(); + // Toggles ToggleCommand.gpartyToggled = initBoolean("toggles", "GParty", false); ToggleCommand.coordsToggled = initBoolean("toggles", "Coords", false); @@ -230,6 +228,7 @@ public class ConfigHandler { ToggleCommand.highlightArachne = initBoolean("toggles", "HighlightArachne", false); ToggleCommand.highlightSkeletonMasters = initBoolean("toggles", "HighlightSkeletonMasters", false); ToggleCommand.teammatesInRadius = initBoolean("toggles", "TeammatesInRadius", false); + ToggleCommand.giantHP = initBoolean("toggles", "GiantHP", false); // Chat Messages ToggleCommand.sceptreMessages = initBoolean("toggles", "SceptreMessages", true); ToggleCommand.midasStaffMessages = initBoolean("toggles", "MidasStaffMessages", true); @@ -481,6 +480,8 @@ public class ConfigHandler { MoveCommand.golemTimerXY[1] = initInt("locations", "golemTimerY", 30); MoveCommand.teammatesInRadiusXY[0] = initInt("locations", "teammatesInRadiusX", 80); MoveCommand.teammatesInRadiusXY[1] = initInt("locations", "teammatesInRadiusY", 100); + MoveCommand.giantHPXY[0] = initInt("locations", "giantHPX", 80); + MoveCommand.giantHPXY[1] = initInt("locations", "giantHPY", 150); // Scales ScaleCommand.coordsScale = initDouble("scales", "coordsScale", 1); @@ -494,6 +495,7 @@ public class ConfigHandler { ScaleCommand.bonzoTimerScale = initDouble("scales", "bonzoTimerScale", 1); ScaleCommand.golemTimerScale = initDouble("scales", "golemTimerScale", 1); ScaleCommand.teammatesInRadiusScale = initDouble("scales", "teammatesInRadiusScale", 1); + ScaleCommand.giantHPScale = initDouble("scales", "giantHPScale", 1); // Colours DankersSkyblockMod.MAIN_COLOUR = initString("colors", "main", EnumChatFormatting.GREEN.toString()); |
