diff options
Diffstat (limited to 'src/main/java/me')
-rw-r--r-- | src/main/java/me/Danker/features/Skill50Display.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/SkillTracker.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/utils/Utils.java | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/me/Danker/features/Skill50Display.java b/src/main/java/me/Danker/features/Skill50Display.java index 230189e..99b1d62 100644 --- a/src/main/java/me/Danker/features/Skill50Display.java +++ b/src/main/java/me/Danker/features/Skill50Display.java @@ -49,7 +49,7 @@ public class Skill50Display { int nextLevelXp; String nextLevelXpString = section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""); if (nextLevelXpString.contains("k")) { - nextLevelXp = Integer.parseInt(nextLevelXpString.substring(0, nextLevelXpString.indexOf("k"))) * 1000; + nextLevelXp = (int) (Double.parseDouble(nextLevelXpString.substring(0, nextLevelXpString.indexOf("k"))) * 1000); } else { nextLevelXp = Integer.parseInt(nextLevelXpString); } diff --git a/src/main/java/me/Danker/features/SkillTracker.java b/src/main/java/me/Danker/features/SkillTracker.java index e71e8d2..9438b3d 100644 --- a/src/main/java/me/Danker/features/SkillTracker.java +++ b/src/main/java/me/Danker/features/SkillTracker.java @@ -72,7 +72,7 @@ public class SkillTracker { int xpToLevelUp; String nextLevelXpString = section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""); if (nextLevelXpString.contains("k")) { - xpToLevelUp = Integer.parseInt(nextLevelXpString.substring(0, nextLevelXpString.indexOf("k"))) * 1000; + xpToLevelUp = (int) (Double.parseDouble(nextLevelXpString.substring(0, nextLevelXpString.indexOf("k"))) * 1000); } else { xpToLevelUp = Integer.parseInt(nextLevelXpString); } diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index b828146..e2dde4b 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -578,7 +578,7 @@ public class Utils { if (!romanNumerals.containsKey(text.charAt(i))) continue; int roman = romanNumerals.get(text.charAt(i)); - if (i != text.length() - 1 && roman < romanNumerals.get(text.charAt(i + 1))) { + if (i != text.length() - 1 && romanNumerals.containsKey(text.charAt(i + 1)) && roman < romanNumerals.get(text.charAt(i + 1))) { number += romanNumerals.get(text.charAt(i + 1)) - roman; i++; } else { |