aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-10-16 22:24:32 -0400
committerbowser0000 <bowser0000@gmail.com>2020-10-16 22:24:32 -0400
commit3413ab538e830977206ec1b6bd95e5f6c334ebf1 (patch)
tree6f496cb847bb555ea4b8bba2f2eed7f4f08f28f0 /src
parentff7001b95634e610a56220c58bc9619c063203da (diff)
downloadSkyblockMod-3413ab538e830977206ec1b6bd95e5f6c334ebf1.tar.gz
SkyblockMod-3413ab538e830977206ec1b6bd95e5f6c334ebf1.tar.bz2
SkyblockMod-3413ab538e830977206ec1b6bd95e5f6c334ebf1.zip
Add ability to disable Livid Dagger
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/TheMod.java9
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java9
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java24
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java2
5 files changed, 35 insertions, 11 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java
index f7b7763..3bb11cf 100644
--- a/src/main/java/me/Danker/TheMod.java
+++ b/src/main/java/me/Danker/TheMod.java
@@ -1882,8 +1882,13 @@ public class TheMod
ItemStack item = event.entityPlayer.getHeldItem();
if (item == null) return;
- if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons") && event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) {
- event.setCanceled(true);
+ if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) {
+ if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) {
+ event.setCanceled(true);
+ }
+ if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) {
+ event.setCanceled(true);
+ }
}
}
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index 32b7d4b..03aa318 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -34,7 +34,7 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" +
EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" +
EnumChatFormatting.GOLD + " /dsm" + EnumChatFormatting.AQUA + " - Opens the GUI for Danker's Skyblock Mod.\n" +
- EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
+ EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" +
EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" +
EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" +
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index affa5cf..fbe5dcc 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -22,6 +22,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean chatMaddoxToggled;
public static boolean spiritBearAlerts;
public static boolean aotdToggled;
+ public static boolean lividDaggerToggled;
public static boolean sceptreMessages;
public static boolean petColoursToggled;
public static boolean dungeonTimerToggled;
@@ -37,7 +38,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/list>";
+ return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/list>";
}
@Override
@@ -48,7 +49,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "list");
+ return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "list");
}
return null;
}
@@ -99,6 +100,10 @@ public class ToggleCommand extends CommandBase implements ICommand {
aotdToggled = !aotdToggled;
cf.writeBooleanConfig("toggles", "AOTD", aotdToggled);
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Block AOTD ability been set to " + EnumChatFormatting.DARK_GREEN + aotdToggled + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("lividdagger")) {
+ lividDaggerToggled = !lividDaggerToggled;
+ cf.writeBooleanConfig("toggles", "LividDagger", lividDaggerToggled);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Block Livid Dagger ability been set to " + EnumChatFormatting.DARK_GREEN + lividDaggerToggled + EnumChatFormatting.GREEN + "."));
} else if (arg1[0].equalsIgnoreCase("sceptremessages")) {
sceptreMessages = !sceptreMessages;
cf.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages);
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 502bcb6..0ee10b9 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -36,6 +36,7 @@ public class DankerGui extends GuiScreen {
private GuiButton chatMaddox;
private GuiButton spiritBearAlert;
private GuiButton aotd;
+ private GuiButton lividDagger;
private GuiButton sceptreMessages;
private GuiButton petColours;
private GuiButton dungeonTimer;
@@ -78,12 +79,14 @@ public class DankerGui extends GuiScreen {
slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal));
// Page 2
aotd = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled));
- sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Enable Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
- petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
- dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled));
- golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
- expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
- skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
+ lividDagger = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled));
+ sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Enable Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
+ petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
+ dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled));
+ golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
+ expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
+ // Page 3
+ skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
if (page == 1) {
this.buttonList.add(changeDisplay);
@@ -97,11 +100,16 @@ public class DankerGui extends GuiScreen {
this.buttonList.add(closeGUI);
} else if (page == 2) {
this.buttonList.add(aotd);
+ this.buttonList.add(lividDagger);
this.buttonList.add(sceptreMessages);
this.buttonList.add(petColours);
this.buttonList.add(dungeonTimer);
this.buttonList.add(golemAlerts);
this.buttonList.add(expertiseLore);
+ this.buttonList.add(nextPage);
+ this.buttonList.add(backPage);
+ this.buttonList.add(closeGUI);
+ } else if (page == 3) {
this.buttonList.add(skill50Display);
this.buttonList.add(backPage);
this.buttonList.add(closeGUI);
@@ -164,6 +172,10 @@ public class DankerGui extends GuiScreen {
ToggleCommand.aotdToggled = !ToggleCommand.aotdToggled;
ConfigHandler.writeBooleanConfig("toggles", "AOTD", ToggleCommand.aotdToggled);
aotd.displayString = "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled);
+ } else if (button == lividDagger) {
+ ToggleCommand.lividDaggerToggled = !ToggleCommand.lividDaggerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "LividDagger", ToggleCommand.lividDaggerToggled);
+ lividDagger.displayString = "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled);
} else if (button == sceptreMessages) {
ToggleCommand.sceptreMessages = !ToggleCommand.sceptreMessages;
ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", ToggleCommand.sceptreMessages);
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index fcb33b2..b903cd3 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -179,6 +179,7 @@ public class ConfigHandler {
if (!hasKey("toggles", "ChatMaddox")) writeBooleanConfig("toggles", "ChatMaddox", true);
if (!hasKey("toggles", "SpiritBearAlerts")) writeBooleanConfig("toggles", "SpiritBearAlerts", true);
if (!hasKey("toggles", "AOTD")) writeBooleanConfig("toggles", "AOTD", false);
+ if (!hasKey("toggles", "LividDagger")) writeBooleanConfig("toggles", "LividDagger", false);
if (!hasKey("toggles", "SceptreMessages")) writeBooleanConfig("toggles", "SceptreMessages", true);
if (!hasKey("toggles", "PetColors")) writeBooleanConfig("toggles", "PetColors", false);
if (!hasKey("toggles", "DungeonTimer")) writeBooleanConfig("toggles", "DungeonTimer", false);
@@ -344,6 +345,7 @@ public class ConfigHandler {
tf.chatMaddoxToggled = getBoolean("toggles", "ChatMaddox");
tf.spiritBearAlerts = getBoolean("toggles", "SpiritBearAlerts");
tf.aotdToggled = getBoolean("toggles", "AOTD");
+ tf.lividDaggerToggled = getBoolean("toggles", "LividDagger");
tf.sceptreMessages = getBoolean("toggles", "SceptreMessages");
tf.petColoursToggled = getBoolean("toggles", "PetColors");
tf.dungeonTimerToggled = getBoolean("toggles", "DungeonTimer");