diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-08-07 01:08:46 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-08-07 01:08:46 -0400 |
commit | 52ee33115e9ca743ffcd778b694a60499a06ea03 (patch) | |
tree | 6fbf833f5f391e2462e83e4da34b656fd1974665 /me/Danker/commands/ImportFishingCommand.java | |
parent | cd9303b0c510005f6162468beb26eb4ec397a757 (diff) | |
download | SkyblockMod-52ee33115e9ca743ffcd778b694a60499a06ea03.tar.gz SkyblockMod-52ee33115e9ca743ffcd778b694a60499a06ea03.tar.bz2 SkyblockMod-52ee33115e9ca743ffcd778b694a60499a06ea03.zip |
Add dolphin pet milestone to fishing tracker
Diffstat (limited to 'me/Danker/commands/ImportFishingCommand.java')
-rw-r--r-- | me/Danker/commands/ImportFishingCommand.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/me/Danker/commands/ImportFishingCommand.java b/me/Danker/commands/ImportFishingCommand.java index 158b4a1..bbbcb9f 100644 --- a/me/Danker/commands/ImportFishingCommand.java +++ b/me/Danker/commands/ImportFishingCommand.java @@ -37,14 +37,14 @@ public class ImportFishingCommand extends CommandBase { ConfigHandler cf = new ConfigHandler(); EntityPlayer player = (EntityPlayer) arg0; - player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Importing your fishing stats...")); - // Check key String key = cf.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); } + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Importing your fishing stats...")); + // Get UUID for Hypixel API requests String username = player.getName(); String uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); @@ -173,6 +173,11 @@ public class ImportFishingCommand extends CommandBase { } lc.seaCreatures += lc.seaEmperors; + lc.fishingMilestone = 0; + if (statsObject.has("pet_milestone_sea_creatures_killed")) { + lc.fishingMilestone = statsObject.get("pet_milestone_sea_creatures_killed").getAsInt(); + } + lc.frozenSteves = 0; if (statsObject.has("kills_frozen_steve")) { lc.frozenSteves = statsObject.get("kills_frozen_steve").getAsInt(); @@ -215,6 +220,7 @@ public class ImportFishingCommand extends CommandBase { cf.writeIntConfig("fishing", "deepSeaProtector", lc.deepSeaProtectors); cf.writeIntConfig("fishing", "hydra", lc.hydras); cf.writeIntConfig("fishing", "seaEmperor", lc.seaEmperors); + cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); cf.writeIntConfig("fishing", "frozenSteve", lc.frozenSteves); cf.writeIntConfig("fishing", "snowman", lc.frostyTheSnowmans); cf.writeIntConfig("fishing", "grinch", lc.grinches); |