diff options
author | RayDeeUx <raydeeux@gmail.com> | 2022-08-19 11:01:29 -0400 |
---|---|---|
committer | RayDeeUx <raydeeux@gmail.com> | 2022-08-19 11:01:29 -0400 |
commit | 62d9012e1b9b5a3337f5a9f0e01fd684c860a4ce (patch) | |
tree | 4270337e299f58487a1f0851303e5ed44bb50584 /src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java | |
parent | d6751da4434b97237d278e1666c031084cd57934 (diff) | |
download | SkyblockHud-Death-Defied-62d9012e1b9b5a3337f5a9f0e01fd684c860a4ce.tar.gz SkyblockHud-Death-Defied-62d9012e1b9b5a3337f5a9f0e01fd684c860a4ce.tar.bz2 SkyblockHud-Death-Defied-62d9012e1b9b5a3337f5a9f0e01fd684c860a4ce.zip |
#BanishTheCommas
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java index d49b681..865b2c1 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java @@ -73,13 +73,13 @@ public class MinesHandler { public static void parseMithril(String line) { try { - mithril = Integer.parseInt(line.toLowerCase().replace("mithril powder:", "").trim()); + mithril = Integer.parseInt(line.toLowerCase().replace("mithril powder:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } public static void parseGemstone(String line) { try { - gemstone = Integer.parseInt(line.toLowerCase().replace("gemstone powder:", "").trim()); + gemstone = Integer.parseInt(line.toLowerCase().replace("gemstone powder:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } @@ -87,17 +87,17 @@ public class MinesHandler { public void onSidebarLineUpdate(SidebarLineUpdateEvent event) { if (event.formattedLine.toLowerCase().contains("heat")) { try { - MiningHud.setHeat(Integer.parseInt(event.formattedLine.toLowerCase().replace("heat:", "").trim())); + MiningHud.setHeat(Integer.parseInt(event.formattedLine.toLowerCase().replace("heat:", "").trim().replaceAll(",", ""))); } catch (Exception ignored) {} } if (event.formattedLine.toLowerCase().contains("mithril")) { try { - mithril = Integer.parseInt(event.formattedLine.toLowerCase().replace("mithril:", "").trim()); + mithril = Integer.parseInt(event.formattedLine.toLowerCase().replace("mithril:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } if (event.formattedLine.toLowerCase().contains("gemstone")) { try { - gemstone = Integer.parseInt(event.formattedLine.toLowerCase().replace("gemstone:", "").trim()); + gemstone = Integer.parseInt(event.formattedLine.toLowerCase().replace("gemstone:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } if (event.formattedLine.toLowerCase().contains("event")) { @@ -115,7 +115,7 @@ public class MinesHandler { if (event.formattedLine.toLowerCase(Locale.ENGLISH).contains("nearby players")) { MinesHandler.currentEvent = Event.TOGETHER; try { - MinesHandler.eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("nearby players:", "").trim()); + MinesHandler.eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("nearby players:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } @@ -123,31 +123,31 @@ public class MinesHandler { if (MinesHandler.currentEvent == Event.TICKET) { if (event.formattedLine.toLowerCase().contains("pool:")) { try { - eventMax = Integer.parseInt(event.formattedLine.toLowerCase().replace("pool:", "").trim().split("/")[0].trim()); + eventMax = Integer.parseInt(event.formattedLine.toLowerCase().replace("pool:", "").trim().replaceAll(",", "").split("/")[0].trim().replaceAll(",", "")); } catch (Exception ignored) {} } else if (event.formattedLine.toLowerCase().contains("tickets:")) { try { - eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("tickets:", "").split("\\(")[0].trim()); + eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("tickets:", "").split("\\(")[0].trim().replaceAll(",", "")); } catch (Exception ignored) {} } } else if (MinesHandler.currentEvent == Event.GOBLIN) { if (event.formattedLine.toLowerCase().contains("remaining:")) { try { - eventMax = Integer.parseInt(event.formattedLine.toLowerCase().replace("goblins", "").replace("remaining:", "").trim()); + eventMax = Integer.parseInt(event.formattedLine.toLowerCase().replace("goblins", "").replace("remaining:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } else if (event.formattedLine.toLowerCase().contains("your kills:") && !event.formattedLine.toLowerCase().contains("(")) { try { - eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("your kills:", "").trim()); + eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("your kills:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } } else if (MinesHandler.currentEvent == Event.GOURMAND) { if (event.formattedLine.toLowerCase().contains("remaining:")) { try { - eventMax = Integer.parseInt(event.formattedLine.toLowerCase().replace("tasty mithril", "").replace("remaining:", "").trim()); + eventMax = Integer.parseInt(event.formattedLine.toLowerCase().replace("tasty mithril", "").replace("remaining:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } else if (event.formattedLine.toLowerCase().contains("your tasty mithril:") && !event.formattedLine.toLowerCase().contains("(")) { try { - eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("your tasty mithril:", "").trim()); + eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("your tasty mithril:", "").trim().replaceAll(",", "")); } catch (Exception ignored) {} } } |