aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-08 16:02:54 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-08 16:02:54 +0200
commit9e08dbf2baa9819abd281ad285df7462c99491e2 (patch)
tree6e874e1c5b74a522d6acca08dd6b64c808ddbbbe /src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
parent1e268208cd700b379952d1718dca66fa4aad305c (diff)
downloadskyhanni-9e08dbf2baa9819abd281ad285df7462c99491e2.tar.gz
skyhanni-9e08dbf2baa9819abd281ad285df7462c99491e2.tar.bz2
skyhanni-9e08dbf2baa9819abd281ad285df7462c99491e2.zip
remove old stuff
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java134
1 files changed, 67 insertions, 67 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
index cc6668a17..d0a4d0eb1 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java
@@ -1,67 +1,67 @@
-package com.thatgravyboat.skyblockhud.location;
-
-import com.thatgravyboat.skyblockhud.api.events.ProfileSwitchedEvent;
-import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent;
-import com.thatgravyboat.skyblockhud.utils.Utils;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-
-public class IslandHandler {
-
- public static int flightTime;
- public static boolean hadFlightTime;
-
- public static int redstone;
- public static boolean hadRedstone;
-
- @SubscribeEvent
- public void onSidebarLineUpdate(SidebarLineUpdateEvent event) {
- hadFlightTime = checkFlightDuration(event.formattedLine);
- hadRedstone = checkRestone(event.formattedLine);
- }
-
- @SubscribeEvent
- public void onProfileSwitch(ProfileSwitchedEvent event) {
- flightTime = 0;
- }
-
- public static boolean checkFlightDuration(String formatedScoreboardLine) {
- if (LocationHandler.getCurrentLocation() == Locations.YOURISLAND && Utils.removeColor(formatedScoreboardLine.toLowerCase().trim()).contains("flight duration:")) {
- String timeString = formatedScoreboardLine.toLowerCase().replace("flight duration:", "").replace(" ", "");
- String[] times = timeString.split(":");
- if (times.length == 2) {
- int s = 0;
- try {
- s += Integer.parseInt(times[0]) * 60;
- } catch (NumberFormatException ignored) {}
- try {
- s += Integer.parseInt(times[1]);
- } catch (NumberFormatException ignored) {}
- flightTime = s - 1;
- } else if (times.length == 3) {
- int s = 0;
- try {
- s += Integer.parseInt(times[0]) * 3600;
- } catch (NumberFormatException ignored) {}
- try {
- s += Integer.parseInt(times[1]) * 60;
- } catch (NumberFormatException ignored) {}
- try {
- s += Integer.parseInt(times[2]);
- } catch (NumberFormatException ignored) {}
- flightTime = s - 1;
- }
- return true;
- }
- return false;
- }
-
- public static boolean checkRestone(String formatedScoreboardLine) {
- 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;
- } catch (Exception ignored) {}
- }
- return false;
- }
-}
+//package com.thatgravyboat.skyblockhud.location;
+//
+//import com.thatgravyboat.skyblockhud.api.events.ProfileSwitchedEvent;
+//import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent;
+//import com.thatgravyboat.skyblockhud.utils.Utils;
+//import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+//
+//public class IslandHandler {
+//
+// public static int flightTime;
+// public static boolean hadFlightTime;
+//
+// public static int redstone;
+// public static boolean hadRedstone;
+//
+// @SubscribeEvent
+// public void onSidebarLineUpdate(SidebarLineUpdateEvent event) {
+// hadFlightTime = checkFlightDuration(event.formattedLine);
+// hadRedstone = checkRestone(event.formattedLine);
+// }
+//
+// @SubscribeEvent
+// public void onProfileSwitch(ProfileSwitchedEvent event) {
+// flightTime = 0;
+// }
+//
+// public static boolean checkFlightDuration(String formatedScoreboardLine) {
+// if (LocationHandler.getCurrentLocation() == Locations.YOURISLAND && Utils.removeColor(formatedScoreboardLine.toLowerCase().trim()).contains("flight duration:")) {
+// String timeString = formatedScoreboardLine.toLowerCase().replace("flight duration:", "").replace(" ", "");
+// String[] times = timeString.split(":");
+// if (times.length == 2) {
+// int s = 0;
+// try {
+// s += Integer.parseInt(times[0]) * 60;
+// } catch (NumberFormatException ignored) {}
+// try {
+// s += Integer.parseInt(times[1]);
+// } catch (NumberFormatException ignored) {}
+// flightTime = s - 1;
+// } else if (times.length == 3) {
+// int s = 0;
+// try {
+// s += Integer.parseInt(times[0]) * 3600;
+// } catch (NumberFormatException ignored) {}
+// try {
+// s += Integer.parseInt(times[1]) * 60;
+// } catch (NumberFormatException ignored) {}
+// try {
+// s += Integer.parseInt(times[2]);
+// } catch (NumberFormatException ignored) {}
+// flightTime = s - 1;
+// }
+// return true;
+// }
+// return false;
+// }
+//
+// public static boolean checkRestone(String formatedScoreboardLine) {
+// 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;
+// } catch (Exception ignored) {}
+// }
+// return false;
+// }
+//}