aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-08-06 14:33:34 -0400
committerbowser0000 <bowser0000@gmail.com>2021-08-06 14:33:34 -0400
commita40b6338955f469f4a476b0d9b0ff61952289bcb (patch)
treeddf11b2fbfd59709f83855e21c4517ff1e8d1f27 /src
parentfa5dc4e65ac16552fc714ab8b5f9753ad0061a4e (diff)
downloadSkyblockMod-a40b6338955f469f4a476b0d9b0ff61952289bcb.tar.gz
SkyblockMod-a40b6338955f469f4a476b0d9b0ff61952289bcb.tar.bz2
SkyblockMod-a40b6338955f469f4a476b0d9b0ff61952289bcb.zip
Fix slayer 20% drops only counting as 1
Also add missing lines in /dsmfarmlength
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/commands/FarmLengthCommand.java2
-rw-r--r--src/main/java/me/Danker/features/loot/LootTracker.java2
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;