aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java
diff options
context:
space:
mode:
authorTymanWasTaken <tyman@tyman.tech>2021-07-06 17:13:01 -0400
committerTymanWasTaken <tyman@tyman.tech>2021-07-06 17:13:01 -0400
commitbb75fd7b83b238f1f922ffc64b2a0a535c5524b7 (patch)
tree617c91cced71f672662bddea6c540939cb9a3953 /src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java
parent91464c8f433e8bf323932ac956678971207b607e (diff)
downloadskyblockhud-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.tar.gz
skyblockhud-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.tar.bz2
skyblockhud-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.zip
Format
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java83
1 files changed, 48 insertions, 35 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java
index e8be465..3eb87d4 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/location/EndIslandHandler.java
@@ -1,46 +1,59 @@
package com.thatgravyboat.skyblockhud.location;
public class EndIslandHandler {
- public enum dragonTypes {
- PROTECTOR("Protector Dragon", 9000000),
- OLD("Old Dragon", 15000000),
- WISE("Wise Dragon", 9000000),
- UNSTABLE("Unstable Dragon", 9000000),
- YOUNG("Young Dragon", 7500000),
- STRONG("Strong Dragon", 9000000),
- SUPERIOR("Superior Dragon", 12000000),
- NODRAGON("", 0);
-
- private final String displayName;
- private final int maxHealth;
-
- dragonTypes(String displayName, int maxHealth){
- this.displayName = displayName;
- this.maxHealth = maxHealth;
- }
- public String getDisplayName(){
- return this.displayName;
- }
+ public enum dragonTypes {
+ PROTECTOR("Protector Dragon", 9000000),
+ OLD("Old Dragon", 15000000),
+ WISE("Wise Dragon", 9000000),
+ UNSTABLE("Unstable Dragon", 9000000),
+ YOUNG("Young Dragon", 7500000),
+ STRONG("Strong Dragon", 9000000),
+ SUPERIOR("Superior Dragon", 12000000),
+ NODRAGON("", 0);
+
+ private final String displayName;
+ private final int maxHealth;
+
+ dragonTypes(String displayName, int maxHealth) {
+ this.displayName = displayName;
+ this.maxHealth = maxHealth;
+ }
- public int getMaxHealth() {
- return this.maxHealth;
- }
+ public String getDisplayName() {
+ return this.displayName;
+ }
+
+ public int getMaxHealth() {
+ return this.maxHealth;
+ }
- public static dragonTypes findDragon(String input){
- if (input.contains(" ")){
- try {
- return dragonTypes.valueOf(input.toLowerCase().replace("dragon", "").replace(" ", "").toUpperCase());
- } catch(IllegalArgumentException ignored) {
- return NODRAGON;
- }
- } else {
- try { return dragonTypes.valueOf(input); } catch(IllegalArgumentException ignored) { return NODRAGON; }
- }
+ public static dragonTypes findDragon(String input) {
+ if (input.contains(" ")) {
+ try {
+ return dragonTypes.valueOf(
+ input
+ .toLowerCase()
+ .replace("dragon", "")
+ .replace(" ", "")
+ .toUpperCase()
+ );
+ } catch (IllegalArgumentException ignored) {
+ return NODRAGON;
+ }
+ } else {
+ try {
+ return dragonTypes.valueOf(input);
+ } catch (IllegalArgumentException ignored) {
+ return NODRAGON;
}
+ }
}
+ }
- private static dragonTypes currentDragon = dragonTypes.NODRAGON;
+ private static dragonTypes currentDragon = dragonTypes.NODRAGON;
- public static void setCurrentDragon(dragonTypes dragon) { currentDragon = dragon; }
+ public static void setCurrentDragon(dragonTypes dragon) {
+ currentDragon = dragon;
+ }
}