diff options
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java index cc6668a..223eaf0 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java @@ -31,22 +31,22 @@ public class IslandHandler { if (times.length == 2) { int s = 0; try { - s += Integer.parseInt(times[0]) * 60; + s += Integer.parseInt(times[0].replaceAll(",", "")) * 60; } catch (NumberFormatException ignored) {} try { - s += Integer.parseInt(times[1]); + s += Integer.parseInt(times[1].replaceAll(",", "")); } catch (NumberFormatException ignored) {} flightTime = s - 1; } else if (times.length == 3) { int s = 0; try { - s += Integer.parseInt(times[0]) * 3600; + s += Integer.parseInt(times[0].replaceAll(",", "")) * 3600; } catch (NumberFormatException ignored) {} try { - s += Integer.parseInt(times[1]) * 60; + s += Integer.parseInt(times[1].replaceAll(",", "")) * 60; } catch (NumberFormatException ignored) {} try { - s += Integer.parseInt(times[2]); + s += Integer.parseInt(times[2].replaceAll(",", "")); } catch (NumberFormatException ignored) {} flightTime = s - 1; } @@ -59,7 +59,7 @@ public class IslandHandler { if (LocationHandler.getCurrentLocation() == Locations.YOURISLAND) { if (formatedScoreboardLine.toLowerCase().contains("redstone:")) return true; try { - redstone = formatedScoreboardLine.toLowerCase().contains("redstone:") ? Integer.parseInt(Utils.removeWhiteSpaceAndRemoveWord(formatedScoreboardLine, "redstone:")) : 0; + redstone = formatedScoreboardLine.toLowerCase().contains("redstone:") ? Integer.parseInt(Utils.removeWhiteSpaceAndRemoveWord(formatedScoreboardLine, "redstone:").replaceAll(",", "")) : 0; } catch (Exception ignored) {} } return false; |