From b3b16e4c82ad1e66f5564c806563dfc23658fdef Mon Sep 17 00:00:00 2001 From: ThatGravyBoat Date: Tue, 13 Jul 2021 04:22:16 +0000 Subject: Prettified Code! --- .../thatgravyboat/skyblockhud/location/FarmHouseHandler.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/FarmHouseHandler.java') 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()]); } - } -- cgit