aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/handlers')
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 34aaffe..f14c4c4 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -2,6 +2,7 @@ package me.Danker.handlers;
import java.io.File;
+import me.Danker.commands.BlockSlayerCommand;
import me.Danker.commands.DisplayCommand;
import me.Danker.commands.LootCommand;
import me.Danker.commands.MoveCommand;
@@ -181,6 +182,7 @@ public class ConfigHandler {
if (!hasKey("toggles", "SceptreMessages")) writeBooleanConfig("toggles", "SceptreMessages", true);
if (!hasKey("toggles", "PetColors")) writeBooleanConfig("toggles", "PetColors", false);
if (!hasKey("toggles", "DungeonTimer")) writeBooleanConfig("toggles", "DungeonTimer", false);
+ if (!hasKey("toggles", "BlockSlayer")) writeStringConfig("toggles", "BlockSlayer", "");
if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", "");
@@ -312,6 +314,13 @@ public class ConfigHandler {
tf.petColoursToggled = getBoolean("toggles", "PetColors");
tf.dungeonTimerToggled = getBoolean("toggles", "DungeonTimer");
+ final BlockSlayerCommand bs = new BlockSlayerCommand();
+ String onlySlayer = getString("toggles", "BlockSlayer");
+ if (!onlySlayer.equals("")) {
+ bs.onlySlayerName = onlySlayer.substring(0, onlySlayer.lastIndexOf(" "));
+ bs.onlySlayerNumber = onlySlayer.substring(onlySlayer.lastIndexOf(" ") + 1, onlySlayer.length());
+ }
+
final LootCommand lc = new LootCommand();
// Wolf
lc.wolfSvens = getInt("wolf", "svens");