diff options
author | TymanWasTaken <tyman@tyman.tech> | 2021-07-06 17:13:01 -0400 |
---|---|---|
committer | TymanWasTaken <tyman@tyman.tech> | 2021-07-06 17:13:01 -0400 |
commit | bb75fd7b83b238f1f922ffc64b2a0a535c5524b7 (patch) | |
tree | 617c91cced71f672662bddea6c540939cb9a3953 /src/main/java/com/thatgravyboat/skyblockhud/dungeons/Classes.java | |
parent | 91464c8f433e8bf323932ac956678971207b607e (diff) | |
download | SkyblockHud-Death-Defied-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.tar.gz SkyblockHud-Death-Defied-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.tar.bz2 SkyblockHud-Death-Defied-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.zip |
Format
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/dungeons/Classes.java')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/dungeons/Classes.java | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/dungeons/Classes.java b/src/main/java/com/thatgravyboat/skyblockhud/dungeons/Classes.java index 14634d8..1c30045 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/dungeons/Classes.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/dungeons/Classes.java @@ -1,50 +1,50 @@ package com.thatgravyboat.skyblockhud.dungeons; public enum Classes { - - H("Healer", "H", 154), - M("Mage", "M", 90), - B("Berserk", "B", 122), - A("Archer", "A", 58), - T("Tank", "T", 186); - - private final String displayName; - private final String classId; - private final int textureY; - - Classes(String name, String id, int textureY) - { - this.displayName = name; - this.classId = id; - this.textureY = textureY; - } - - public String getDisplayName() { - return this.displayName; - } - - public String getClassId() { - return this.classId; - } + H("Healer", "H", 154), + M("Mage", "M", 90), + B("Berserk", "B", 122), + A("Archer", "A", 58), + T("Tank", "T", 186); - public int getTextureY() { - return this.textureY; - } + private final String displayName; + private final String classId; + private final int textureY; + + Classes(String name, String id, int textureY) { + this.displayName = name; + this.classId = id; + this.textureY = textureY; + } + + public String getDisplayName() { + return this.displayName; + } + + public String getClassId() { + return this.classId; + } + + public int getTextureY() { + return this.textureY; + } - public static Classes findClass(String input){ - if (input.length() == 1){ - try{ - return Classes.valueOf(input.toUpperCase()); - } catch (IllegalArgumentException ignored){} - } else if (input.length() == 3){ - try{ - return Classes.valueOf(input.replace("[", "").replace("]", "").toUpperCase()); - } catch (IllegalArgumentException ignored){} - } else { - for(Classes clazz : Classes.values()){ - if (clazz.displayName.equalsIgnoreCase(input)) return clazz; - } - } - return B; + public static Classes findClass(String input) { + if (input.length() == 1) { + try { + return Classes.valueOf(input.toUpperCase()); + } catch (IllegalArgumentException ignored) {} + } else if (input.length() == 3) { + try { + return Classes.valueOf( + input.replace("[", "").replace("]", "").toUpperCase() + ); + } catch (IllegalArgumentException ignored) {} + } else { + for (Classes clazz : Classes.values()) { + if (clazz.displayName.equalsIgnoreCase(input)) return clazz; + } } + return B; + } } |