aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/location
diff options
context:
space:
mode:
authorThatGravyBoat <ThatGravyBoat@users.noreply.github.com>2021-07-13 04:22:16 +0000
committerGitHub Action <actions@github.com>2021-07-13 04:22:16 +0000
commitb3b16e4c82ad1e66f5564c806563dfc23658fdef (patch)
tree676f37e897537a4820204c30b52b8bc9379c324a /src/main/java/com/thatgravyboat/skyblockhud/location
parent3bd212839e1d3c497a840221a0c149451967467e (diff)
downloadSkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.tar.gz
SkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.tar.bz2
SkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.zip
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/FarmHouseHandler.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/FarmHouseHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/FarmHouseHandler.java
index 432bfbb..005d9ff 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/location/FarmHouseHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/location/FarmHouseHandler.java
@@ -17,12 +17,12 @@ public class FarmHouseHandler {
@SubscribeEvent
public void onSidebarLineUpdate(SidebarLineUpdateEvent event) {
- if (event.formattedLine.contains("medals:")){
+ if (event.formattedLine.contains("medals:")) {
for (Medal value : Medal.values()) {
- if (event.formattedLine.contains(value.name())){
+ if (event.formattedLine.contains(value.name())) {
try {
medals[value.ordinal()] = Integer.parseInt(event.formattedLine.replace("medals:", "").replace(value.name(), "").trim());
- }catch (Exception ignored){}
+ } catch (Exception ignored) {}
break;
}
}
@@ -30,13 +30,12 @@ public class FarmHouseHandler {
}
@SubscribeEvent
- public void onProfileSwitch(ProfileSwitchedEvent event){
+ public void onProfileSwitch(ProfileSwitchedEvent event) {
Arrays.fill(medals, 0);
}
- public static String getFormattedMedals(Medal medal){
+ public static String getFormattedMedals(Medal medal) {
if (medal == null) return "0";
return String.valueOf(medals[medal.ordinal()]);
}
-
}