aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
index a50358d..d16a3ac 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
@@ -30,14 +30,9 @@ public class IslandHandler {
public static boolean checkFlightDuration(String formatedScoreboardLine) {
if (
LocationHandler.getCurrentLocation() == Locations.YOURISLAND &&
- Utils
- .removeColor(formatedScoreboardLine.toLowerCase().trim())
- .contains("flight duration:")
+ Utils.removeColor(formatedScoreboardLine.toLowerCase().trim()).contains("flight duration:")
) {
- String timeString = formatedScoreboardLine
- .toLowerCase()
- .replace("flight duration:", "")
- .replace(" ", "");
+ String timeString = formatedScoreboardLine.toLowerCase().replace("flight duration:", "").replace(" ", "");
String[] times = timeString.split(":");
if (times.length == 2) {
int s = 0;
@@ -68,18 +63,11 @@ public class IslandHandler {
public static boolean checkRestone(String formatedScoreboardLine) {
if (LocationHandler.getCurrentLocation() == Locations.YOURISLAND) {
- if (
- formatedScoreboardLine.toLowerCase().contains("redstone:")
- ) return true;
+ if (formatedScoreboardLine.toLowerCase().contains("redstone:")) return true;
try {
redstone =
formatedScoreboardLine.toLowerCase().contains("redstone:")
- ? Integer.parseInt(
- Utils.removeWhiteSpaceAndRemoveWord(
- formatedScoreboardLine,
- "redstone:"
- )
- )
+ ? Integer.parseInt(Utils.removeWhiteSpaceAndRemoveWord(formatedScoreboardLine, "redstone:"))
: 0;
} catch (Exception ignored) {}
}