From d4ad1e310d0a33d8caf86effe44d08babff8cdf1 Mon Sep 17 00:00:00 2001 From: RayDeeUx Date: Mon, 13 Jun 2022 21:17:55 -0400 Subject: brian pls work --- .../skyblockhud/handlers/SlayerHandler.java | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/main/java/com') 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) {} } } } -- cgit