diff options
author | RayDeeUx <raydeeux@gmail.com> | 2022-06-13 21:17:55 -0400 |
---|---|---|
committer | RayDeeUx <raydeeux@gmail.com> | 2022-06-13 21:17:55 -0400 |
commit | d4ad1e310d0a33d8caf86effe44d08babff8cdf1 (patch) | |
tree | 80bfb93dbeb24610249b3f722bb998a000d871ed /src/main | |
parent | 1ced81e5d902c91db55819cd5bb8f17bf241d361 (diff) | |
download | SkyblockHud-Death-Defied-d4ad1e310d0a33d8caf86effe44d08babff8cdf1.tar.gz SkyblockHud-Death-Defied-d4ad1e310d0a33d8caf86effe44d08babff8cdf1.tar.bz2 SkyblockHud-Death-Defied-d4ad1e310d0a33d8caf86effe44d08babff8cdf1.zip |
brian pls work
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java index bf5dfdc..49f3ca5 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java @@ -68,17 +68,19 @@ public class SlayerHandler { for (int i = 0; i < event.scores.size(); i++) { String line = event.scores.get(i); if (line.contains("Slayer Quest") && event.scores.size() > 3) { - String slayer = event.scores.get(i - 1).toLowerCase(); - SlayerHandler.slayerTypes selectedSlayer = SlayerHandler.slayerTypes.NONE; - for (slayerTypes types : slayerTypes.values()) { - if (slayer.contains(types.displayName.toLowerCase(Locale.ENGLISH))) { - selectedSlayer = types; - break; + try { + String slayer = event.scores.get(i - 1).toLowerCase(); + SlayerHandler.slayerTypes selectedSlayer = SlayerHandler.slayerTypes.NONE; + for (slayerTypes types : slayerTypes.values()) { + if (slayer.contains(types.displayName.toLowerCase(Locale.ENGLISH))) { + selectedSlayer = types; + break; + } } - } - SlayerHandler.currentSlayer = selectedSlayer; - SlayerHandler.slayerTier = Utils.whatRomanNumeral(slayer.replace(selectedSlayer.getDisplayName().toLowerCase(), "").replace(" ", "")); - break; + SlayerHandler.currentSlayer = selectedSlayer; + SlayerHandler.slayerTier = Utils.whatRomanNumeral(slayer.replace(selectedSlayer.getDisplayName().toLowerCase(), "").replace(" ", "")); + break; + } catch (Exception ignored) {} } } } |