From 3198b59936c0221b258fa6e97edaf33eed336ee7 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 14 Sep 2020 18:35:13 -0400 Subject: Add importing shark kills --- .../me/Danker/commands/ImportFishingCommand.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/main') diff --git a/src/main/java/me/Danker/commands/ImportFishingCommand.java b/src/main/java/me/Danker/commands/ImportFishingCommand.java index bbbcb9f..dc9bd9b 100644 --- a/src/main/java/me/Danker/commands/ImportFishingCommand.java +++ b/src/main/java/me/Danker/commands/ImportFishingCommand.java @@ -202,6 +202,30 @@ public class ImportFishingCommand extends CommandBase { } lc.seaCreatures += lc.yetis; + lc.nurseSharks = 0; + if (statsObject.has("kills_nurse_shark")) { + lc.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt(); + } + lc.seaCreatures += lc.nurseSharks; + + lc.blueSharks = 0; + if (statsObject.has("kills_nurse_shark")) { + lc.blueSharks = statsObject.get("kills_blue_shark").getAsInt(); + } + lc.seaCreatures += lc.blueSharks; + + lc.tigerSharks = 0; + if (statsObject.has("kills_nurse_shark")) { + lc.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt(); + } + lc.seaCreatures += lc.tigerSharks; + + lc.greatWhiteSharks = 0; + if (statsObject.has("kills_nurse_shark")) { + lc.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt(); + } + lc.seaCreatures += lc.greatWhiteSharks; + System.out.println("Writing to config..."); cf.writeIntConfig("fishing", "goodCatch", lc.goodCatches); cf.writeIntConfig("fishing", "greatCatch", lc.greatCatches); @@ -225,6 +249,10 @@ public class ImportFishingCommand extends CommandBase { cf.writeIntConfig("fishing", "snowman", lc.frostyTheSnowmans); cf.writeIntConfig("fishing", "grinch", lc.grinches); cf.writeIntConfig("fishing", "yeti", lc.yetis); + cf.writeIntConfig("fishing", "nurseShark", lc.nurseSharks); + cf.writeIntConfig("fishing", "blueShark", lc.blueSharks); + cf.writeIntConfig("fishing", "tigerShark", lc.tigerSharks); + cf.writeIntConfig("fishing", "greatWhiteShark", lc.greatWhiteSharks); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Fishing stats imported.")); }).start(); -- cgit