aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-09-04 19:37:28 -0400
committerbowser0000 <bowser0000@gmail.com>2020-09-04 19:37:28 -0400
commitc33d70d29a8976079be54507ea8c53cec1a01a49 (patch)
treeb8b4913e943bb57c021128e311aff3e5e10090ed /src/main/java/me/Danker/commands
parent6921e6b5804bebcdabd0a05f187273f005b58bea (diff)
downloadSkyblockMod-c33d70d29a8976079be54507ea8c53cec1a01a49.tar.gz
SkyblockMod-c33d70d29a8976079be54507ea8c53cec1a01a49.tar.bz2
SkyblockMod-c33d70d29a8976079be54507ea8c53cec1a01a49.zip
Add dungeon timer, fix dungeon coins and time tracker
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java6
-rw-r--r--src/main/java/me/Danker/commands/MoveCommand.java15
-rw-r--r--src/main/java/me/Danker/commands/ScaleCommand.java13
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java16
4 files changed, 34 insertions, 16 deletions
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index 4b92137..52db06b 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -33,14 +33,14 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.AQUA + " <> = Mandatory parameter. [] = Optional parameter.\n" +
EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" +
EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" +
- EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/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/sceptremessages/petcolors/dungeontimer/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-4)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" +
EnumChatFormatting.GOLD + " /display <zombie/spider/wolf/fishing/catacombs/off> [winter/f(1-4)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead.\n" +
EnumChatFormatting.GOLD + " /resetloot <zombie/spider/wolf/fishing/catacombs/confirm/cancel>" + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" +
- EnumChatFormatting.GOLD + " /move <coords/display> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
- EnumChatFormatting.GOLD + " /scale <coords/display> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" +
+ EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
+ EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" +
EnumChatFormatting.GOLD + " /slayer [player]" + EnumChatFormatting.AQUA + " - Uses API to get slayer xp of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /skills [player]" + EnumChatFormatting.AQUA + " - Uses API to get skill levels of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /guildof [player]" + EnumChatFormatting.AQUA + " - Uses API to get guild name and guild master of a person. If no name is provided, it checks yours.\n" +
diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java
index 1232e18..24396ff 100644
--- a/src/main/java/me/Danker/commands/MoveCommand.java
+++ b/src/main/java/me/Danker/commands/MoveCommand.java
@@ -15,6 +15,7 @@ public class MoveCommand extends CommandBase {
public static int[] coordsXY = {0, 0};
public static int[] displayXY = {0, 0};
+ public static int[] dungeonTimerXY = {0, 0};
@Override
public String getCommandName() {
@@ -23,7 +24,7 @@ public class MoveCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <coords/display> <x> <y>";
+ return getCommandName() + " <coords/display/dungeontimer> <x> <y>";
}
@Override
@@ -34,7 +35,7 @@ public class MoveCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "coords", "display");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer");
}
return null;
}
@@ -45,7 +46,7 @@ public class MoveCommand extends CommandBase {
final ConfigHandler cf = new ConfigHandler();
if (arg1.length < 2) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display> <x> <y>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display/dungeontimer> <x> <y>"));
return;
}
@@ -61,8 +62,14 @@ public class MoveCommand extends CommandBase {
cf.writeIntConfig("locations", "displayX", displayXY[0]);
cf.writeIntConfig("locations", "displayY", displayXY[1]);
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Tracker display has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2]));
+ } else if (arg1[0].equalsIgnoreCase("dungeontimer")) {
+ dungeonTimerXY[0] = Integer.parseInt(arg1[1]);
+ dungeonTimerXY[1] = Integer.parseInt(arg1[2]);
+ cf.writeIntConfig("locations", "dungeonTimerX", dungeonTimerXY[0]);
+ cf.writeIntConfig("locations", "dungeonTimerY", dungeonTimerXY[1]);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2]));
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display> <x> <y>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display/dungeontimer> <x> <y>"));
}
}
diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java
index f8c73c9..03c0793 100644
--- a/src/main/java/me/Danker/commands/ScaleCommand.java
+++ b/src/main/java/me/Danker/commands/ScaleCommand.java
@@ -15,6 +15,7 @@ public class ScaleCommand extends CommandBase {
public static double coordsScale;
public static double displayScale;
+ public static double dungeonTimerScale;
@Override
public String getCommandName() {
@@ -23,7 +24,7 @@ public class ScaleCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <coords/display> <size (0.1 - 10)>";
+ return getCommandName() + " <coords/display/dungeontimer> <size (0.1 - 10)>";
}
@Override
@@ -34,7 +35,7 @@ public class ScaleCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "coords", "display");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer");
}
return null;
}
@@ -44,7 +45,7 @@ public class ScaleCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length < 2) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale <coords/display> <size (0.1 - 10)>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale <coords/display/dungeontimer> <size (0.1 - 10)>"));
return;
}
@@ -62,8 +63,12 @@ public class ScaleCommand extends CommandBase {
displayScale = scaleAmount;
ConfigHandler.writeDoubleConfig("scales", "displayScale", displayScale);
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Display has been scaled to " + EnumChatFormatting.DARK_GREEN + displayScale + "x"));
+ } else if (arg1[0].equalsIgnoreCase("dungeontimer")) {
+ dungeonTimerScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "dungeonTimerScale", dungeonTimerScale);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been scaled to " + EnumChatFormatting.DARK_GREEN + dungeonTimerScale + "x"));
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale <coords/display> <size (0.1 - 10)>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale <coords/display/dungeontimer> <size (0.1 - 10)>"));
}
}
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 5c37b83..b1e5270 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -24,6 +24,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean aotdToggled;
public static boolean sceptreMessages;
public static boolean petColoursToggled;
+ public static boolean dungeonTimerToggled;
@Override
public String getCommandName() {
@@ -32,7 +33,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/list>";
+ return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/sceptremessages/petcolors/dungeontimer/list>";
}
@Override
@@ -43,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", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "sceptremessages", "petcolors", "list");
+ return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "sceptremessages", "petcolors", "dungeontimer", "list");
}
return null;
}
@@ -54,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/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
return;
}
@@ -102,6 +103,10 @@ public class ToggleCommand extends CommandBase implements ICommand {
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" +
@@ -113,9 +118,10 @@ public class ToggleCommand extends CommandBase implements ICommand {
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));
+ 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/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
}
}
}