aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/ToggleCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-09-05 18:35:43 -0400
committerGitHub <noreply@github.com>2020-09-05 18:35:43 -0400
commit20b405f59dcd92df1b4c3cd5b9ac353652ef4405 (patch)
treef387a1ca10387c77381a22568b486984da5b38a6 /src/main/java/me/Danker/commands/ToggleCommand.java
parent3ed5e14d43c6f3ff3cdce7598d01254e9465c33d (diff)
parenta29cfb42db5da544f8445f56acb3742e396d8dee (diff)
downloadSkyblockMod-1.7.tar.gz
SkyblockMod-1.7.tar.bz2
SkyblockMod-1.7.zip
v1.7v1.7
Merge pull request #13 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/commands/ToggleCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java54
1 files changed, 49 insertions, 5 deletions
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index decf99a..b1e5270 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -18,6 +18,13 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean goldenToggled;
public static boolean slayerCountTotal;
public static boolean rngesusAlerts;
+ public static boolean splitFishing;
+ public static boolean chatMaddoxToggled;
+ public static boolean spiritBearAlerts;
+ public static boolean aotdToggled;
+ public static boolean sceptreMessages;
+ public static boolean petColoursToggled;
+ public static boolean dungeonTimerToggled;
@Override
public String getCommandName() {
@@ -26,7 +33,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/list>";
+ return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/sceptremessages/petcolors/dungeontimer/list>";
}
@Override
@@ -37,7 +44,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", "list");
+ return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "sceptremessages", "petcolors", "dungeontimer", "list");
}
return null;
}
@@ -48,7 +55,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
final ConfigHandler cf = new ConfigHandler();
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
return;
}
@@ -66,18 +73,55 @@ public class ToggleCommand extends CommandBase implements ICommand {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Golden T6 enchants has been set to " + EnumChatFormatting.DARK_GREEN + goldenToggled + EnumChatFormatting.GREEN + "."));
} else if (arg1[0].equalsIgnoreCase("slayercount")) {
slayerCountTotal = !slayerCountTotal;
+ cf.writeBooleanConfig("toggles", "SlayerCount", slayerCountTotal);
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Counting total 20% slayer drops has been set to " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + EnumChatFormatting.GREEN + "."));
} else if (arg1[0].equalsIgnoreCase("rngesusalerts")) {
rngesusAlerts = !rngesusAlerts;
+ cf.writeBooleanConfig("toggles", "RNGesusAlerts", rngesusAlerts);
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Slayer RNGesus alerts has been set to " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("splitfishing")) {
+ splitFishing = !splitFishing;
+ cf.writeBooleanConfig("toggles", "SplitFishing", splitFishing);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Split fishing display has been set to " + EnumChatFormatting.DARK_GREEN + splitFishing + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("chatmaddox")) {
+ chatMaddoxToggled = !chatMaddoxToggled;
+ cf.writeBooleanConfig("toggles", "ChatMaddox", chatMaddoxToggled);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Chat Maddox menu has been set to " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("spiritbearalerts")) {
+ spiritBearAlerts = !spiritBearAlerts;
+ cf.writeBooleanConfig("toggles", "SpiritBearAlerts", spiritBearAlerts);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Spirit Bear alerts have been set to " + EnumChatFormatting.DARK_GREEN + spiritBearAlerts + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("aotd")) {
+ 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("sceptremessages")) {
+ sceptreMessages = !sceptreMessages;
+ cf.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Spirit Sceptre messages have been set to " + EnumChatFormatting.DARK_GREEN + sceptreMessages + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("petcolors") || arg1[0].equalsIgnoreCase("petcolours")) {
+ petColoursToggled = !petColoursToggled;
+ cf.writeBooleanConfig("toggles", "PetColors", petColoursToggled);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Pet colours have been set to " + EnumChatFormatting.DARK_GREEN + petColoursToggled + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("dungeontimer")) {
+ dungeonTimerToggled = !dungeonTimerToggled;
+ cf.writeBooleanConfig("toggles", "DungeonTimer", dungeonTimerToggled);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been set to " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled + EnumChatFormatting.GREEN + "."));
} else if (arg1[0].equalsIgnoreCase("list")) {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" +
EnumChatFormatting.GREEN + " Coord/Angle display: " + EnumChatFormatting.DARK_GREEN + coordsToggled + "\n" +
EnumChatFormatting.GREEN + " Golden T6 enchants: " + EnumChatFormatting.DARK_GREEN + goldenToggled + "\n" +
EnumChatFormatting.GREEN + " Counting total 20% slayer drops: " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + "\n" +
- EnumChatFormatting.GREEN + " Slayer RNGesus alerts: " + EnumChatFormatting.DARK_GREEN + rngesusAlerts));
+ EnumChatFormatting.GREEN + " Slayer RNGesus alerts: " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + "\n" +
+ EnumChatFormatting.GREEN + " Split fishing display: " + EnumChatFormatting.DARK_GREEN + splitFishing + "\n" +
+ EnumChatFormatting.GREEN + " Chat Maddox menu: " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled + "\n" +
+ EnumChatFormatting.GREEN + " Spirit Bear alerts: " + EnumChatFormatting.DARK_GREEN + spiritBearAlerts + "\n" +
+ EnumChatFormatting.GREEN + " Block AOTD ability: " + EnumChatFormatting.DARK_GREEN + aotdToggled + "\n" +
+ EnumChatFormatting.GREEN + " Spirit Sceptre messages: " + EnumChatFormatting.DARK_GREEN + sceptreMessages + "\n" +
+ EnumChatFormatting.GREEN + " Pet colours: " + EnumChatFormatting.DARK_GREEN + petColoursToggled + "\n" +
+ EnumChatFormatting.GREEN + " Dungeon timer: " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled));
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
}
}
}