aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/location/ParkIslandHandler.java
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-06 15:10:29 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-06 15:10:29 -0230
commit6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a (patch)
tree7451e53ceeae3c324d83a7faba83ce80005e6f23 /src/main/java/com/thatgravyboat/skyblockhud/location/ParkIslandHandler.java
downloadskyblockhud-6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a.tar.gz
skyblockhud-6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a.tar.bz2
skyblockhud-6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a.zip
Initial Commit
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/ParkIslandHandler.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/ParkIslandHandler.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/ParkIslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/ParkIslandHandler.java
new file mode 100644
index 0000000..2a41391
--- /dev/null
+++ b/src/main/java/com/thatgravyboat/skyblockhud/location/ParkIslandHandler.java
@@ -0,0 +1,31 @@
+package com.thatgravyboat.skyblockhud.location;
+
+import javax.annotation.Nullable;
+
+public class ParkIslandHandler {
+
+ private static boolean isRaining = false;
+ private static String rainTime = "";
+
+ public static void parseRain(@Nullable String tabLine){
+ if (tabLine == null){
+ isRaining = false;
+ rainTime = "";
+ }
+ else if (tabLine.toLowerCase().contains("rain:")){
+ if (tabLine.toLowerCase().contains("no rain")) isRaining = false;
+ else {
+ rainTime = tabLine.toLowerCase().replace("rain:", "").replace(" ", "");
+ isRaining = true;
+ }
+ }
+ }
+
+ public static String getRainTime(){
+ return rainTime;
+ }
+
+ public static boolean isRaining(){
+ return isRaining;
+ }
+}