aboutsummaryrefslogtreecommitdiff
path: root/me/Danker/handlers/ConfigHandler.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-07-13 17:42:57 -0400
committerbowser0000 <bowser0000@gmail.com>2020-07-13 17:42:57 -0400
commit8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2 (patch)
tree4ae7cd5ff26139a3fb0f390cbe359fa210337f7b /me/Danker/handlers/ConfigHandler.java
parentec0334bfb60226e5bd0fb987babbe16384bd5ae0 (diff)
downloadSkyblockMod-8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2.tar.gz
SkyblockMod-8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2.tar.bz2
SkyblockMod-8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2.zip
/move command, colours and slayer fixv1.4.1
Added /move command to move text displays. Add colour to messages and error messages in chat. Fixed slayer drops not being tracked.
Diffstat (limited to 'me/Danker/handlers/ConfigHandler.java')
-rw-r--r--me/Danker/handlers/ConfigHandler.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/me/Danker/handlers/ConfigHandler.java b/me/Danker/handlers/ConfigHandler.java
index c9556f1..64ada11 100644
--- a/me/Danker/handlers/ConfigHandler.java
+++ b/me/Danker/handlers/ConfigHandler.java
@@ -4,7 +4,10 @@ import java.io.File;
import me.Danker.commands.DisplayCommand;
import me.Danker.commands.LootCommand;
+import me.Danker.commands.MoveCommand;
import me.Danker.commands.ToggleCommand;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.ScaledResolution;
import net.minecraftforge.common.config.Configuration;
public class ConfigHandler {
@@ -166,6 +169,13 @@ public class ConfigHandler {
if (!hasKey("misc", "display")) writeStringConfig("misc", "display", "off");
+ ScaledResolution scaled = new ScaledResolution(Minecraft.getMinecraft());
+ int height = scaled.getScaledHeight();
+ if (!hasKey("locations", "coordsX")) writeIntConfig("locations", "coordsX", 5);
+ if (!hasKey("locations", "coordsY")) writeIntConfig("locations", "coordsY", height - 25);
+ if (!hasKey("locations", "displayX")) writeIntConfig("locations", "displayX", 80);
+ if (!hasKey("locations", "displayY")) writeIntConfig("locations", "displayY", 5);
+
final ToggleCommand tf = new ToggleCommand();
tf.gpartyToggled = getBoolean("toggles", "GParty");
tf.coordsToggled = getBoolean("toggles", "Coords");
@@ -211,6 +221,12 @@ public class ConfigHandler {
final DisplayCommand ds = new DisplayCommand();
ds.display = getString("misc", "display");
+
+ final MoveCommand moc = new MoveCommand();
+ moc.coordsXY[0] = getInt("locations", "coordsX");
+ moc.coordsXY[1] = getInt("locations", "coordsY");
+ moc.displayXY[0] = getInt("locations", "displayX");
+ moc.displayXY[1] = getInt("locations", "displayY");
}
}