diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-07-05 11:44:21 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-07-05 11:44:21 -0400 |
commit | 17d42cffb8264a604e93052ee146887ae7fd32cb (patch) | |
tree | 993cb0f0784fc432c0c7f7baa61a3a52e36964f8 /src/main/java/me/Danker | |
parent | 647728fb3945fa4c3ac5e74026343d1a4d5024a7 (diff) | |
download | SkyblockMod-17d42cffb8264a604e93052ee146887ae7fd32cb.tar.gz SkyblockMod-17d42cffb8264a604e93052ee146887ae7fd32cb.tar.bz2 SkyblockMod-17d42cffb8264a604e93052ee146887ae7fd32cb.zip |
More skill fixes
Diffstat (limited to 'src/main/java/me/Danker')
-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 { |