aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-08-11 18:45:37 -0400
committerbowser0000 <bowser0000@gmail.com>2022-08-11 18:45:37 -0400
commit8e4810bdaff443866f7c5a1346ba919bc8083899 (patch)
tree4addf661115f0889d66f0f7d55fd4794c6afcd34 /src/main/java/me/Danker/features/loot/TrophyFishTracker.java
parent57b96b1c968c95284a8f399b97a0ce96d998faf9 (diff)
downloadSkyblockMod-8e4810bdaff443866f7c5a1346ba919bc8083899.tar.gz
SkyblockMod-8e4810bdaff443866f7c5a1346ba919bc8083899.tar.bz2
SkyblockMod-8e4810bdaff443866f7c5a1346ba919bc8083899.zip
Fix trophy fish display crash
Diffstat (limited to 'src/main/java/me/Danker/features/loot/TrophyFishTracker.java')
-rw-r--r--src/main/java/me/Danker/features/loot/TrophyFishTracker.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/features/loot/TrophyFishTracker.java b/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
index 6202871..f9936f0 100644
--- a/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
+++ b/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
@@ -3,6 +3,7 @@ package me.Danker.features.loot;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import me.Danker.events.ModInitEvent;
+import me.Danker.events.PostConfigInitEvent;
import me.Danker.utils.RenderUtils;
import me.Danker.utils.Utils;
import net.minecraft.init.Items;
@@ -58,8 +59,13 @@ public class TrophyFishTracker {
@SubscribeEvent
public void init(ModInitEvent event) {
configFile = event.configDirectory + "/dsmtrophyfish.json";
+ }
+
+ @SubscribeEvent
+ public void postConfigInit(PostConfigInitEvent event) {
if (fish.entrySet().isEmpty()) fish = createEmpty();
fishSession = createEmpty();
+ save();
}
@SubscribeEvent(receiveCanceled = true)