diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/me/Danker/commands/FarmLengthCommand.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/loot/LootTracker.java | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/commands/FarmLengthCommand.java b/src/main/java/me/Danker/commands/FarmLengthCommand.java index 6a28430..c9c8e11 100644 --- a/src/main/java/me/Danker/commands/FarmLengthCommand.java +++ b/src/main/java/me/Danker/commands/FarmLengthCommand.java @@ -36,6 +36,7 @@ public class FarmLengthCommand extends CommandBase { if (arg1.length == 0) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Current Range: " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.min + DankersSkyblockMod.MAIN_COLOUR + " to " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.max)); + return; } else if (arg1.length < 2) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; @@ -45,6 +46,7 @@ public class FarmLengthCommand extends CommandBase { EndOfFarmAlert.max = Double.parseDouble(arg1[1]); ConfigHandler.writeDoubleConfig("misc", "farmMin", EndOfFarmAlert.min); ConfigHandler.writeDoubleConfig("misc", "farmMax", EndOfFarmAlert.max); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Farm length set to " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.min + DankersSkyblockMod.MAIN_COLOUR + " to " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.max)); } } diff --git a/src/main/java/me/Danker/features/loot/LootTracker.java b/src/main/java/me/Danker/features/loot/LootTracker.java index 58f5a54..8a2739a 100644 --- a/src/main/java/me/Danker/features/loot/LootTracker.java +++ b/src/main/java/me/Danker/features/loot/LootTracker.java @@ -1318,7 +1318,7 @@ public class LootTracker { } public int getAmountfromMessage(String message) { - if (message.charAt(message.indexOf("(") + 1) == 'x') { + if (message.charAt(message.indexOf("(") + 2) == 'x') { return Integer.parseInt(message.substring(message.indexOf("(") + 1, message.indexOf("x"))); } else { return 1; |