aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
diff options
context:
space:
mode:
authorhannibal00212 <hannibal00212@users.noreply.github.com>2022-07-08 10:07:34 +0000
committerGitHub Action <actions@github.com>2022-07-08 10:07:34 +0000
commit324f31cd1402ad8f7877bb9bba99036e4140bbdb (patch)
tree94beace22acbaaca08360122d79500dd3abed945 /src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
parentc167f4e84e22da7b7c4405b5d59c817734654fc0 (diff)
downloadskyhanni-324f31cd1402ad8f7877bb9bba99036e4140bbdb.tar.gz
skyhanni-324f31cd1402ad8f7877bb9bba99036e4140bbdb.tar.bz2
skyhanni-324f31cd1402ad8f7877bb9bba99036e4140bbdb.zip
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
index 15fff4928..17b489fee 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
@@ -13,6 +13,8 @@ import com.google.gson.GsonBuilder;
import com.thatgravyboat.skyblockhud.commands.Commands;
import com.thatgravyboat.skyblockhud.config.SBHConfig;
import com.thatgravyboat.skyblockhud.textures.Textures;
+import java.io.*;
+import java.nio.charset.StandardCharsets;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.IReloadableResourceManager;
@@ -23,9 +25,6 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
-import java.io.*;
-import java.nio.charset.StandardCharsets;
-
@Mod(modid = SkyblockHud.MODID, version = SkyblockHud.VERSION)
public class SkyblockHud {
@@ -87,16 +86,14 @@ public class SkyblockHud {
try {
//noinspection ResultOfMethodCallIgnored
configDirectory.mkdir();
- } catch (Exception ignored) {
- }
+ } catch (Exception ignored) {}
configFile = new File(configDirectory, "config.json");
if (configFile.exists()) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) {
config = gson.fromJson(reader, SBHConfig.class);
- } catch (Exception ignored) {
- }
+ } catch (Exception ignored) {}
}
if (config == null) {
@@ -110,7 +107,7 @@ public class SkyblockHud {
// WarpHandler.save();
// }
//
- Runtime.getRuntime().addShutdownHook(new Thread(this::saveConfig));
+ Runtime.getRuntime().addShutdownHook(new Thread(this::saveConfig));
// Runtime.getRuntime().addShutdownHook(new Thread(TrackerFileLoader::saveTrackerStatsFile));
}
@@ -122,8 +119,7 @@ public class SkyblockHud {
try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(configFile), StandardCharsets.UTF_8))) {
writer.write(gson.toJson(config));
}
- } catch (IOException ignored) {
- }
+ } catch (IOException ignored) {}
}
// @EventHandler