From e6fda2edb243df9b95ce062ac65e088ab40d5dfd Mon Sep 17 00:00:00 2001 From: Cow Date: Sun, 16 Jul 2023 13:31:20 +0200 Subject: Removed 'last profile save' from player lookup Corresponding API field was removed https://github.com/HypixelDev/PublicAPI/issues/596 --- CHANGELOG.md | 1 + src/main/java/de/cowtipper/cowlection/command/MooCommand.java | 4 ---- src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java | 5 ----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d543c..2efdc95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [1.8.9-0.16.0] - unreleased ### Changed - Dungeons overlay: now disabled by default (old config entries aren't modified) +- SkyBlock player lookup: removed 'last played/last profile save' as it's no longer part of the API ### Fixed - Pet exp in tooltips: fixed rare crash caused by unexpected NBT data typing diff --git a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java index 6debc4e..9c950b6 100644 --- a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java +++ b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java @@ -618,10 +618,6 @@ public class MooCommand extends CommandBase { sbStats.appendFreshSibling(new MooChatComponent.KeyValueChatComponent("Fairy Souls", (member.getFairySoulsCollected() >= 0) ? String.valueOf(member.getFairySoulsCollected()) : "API access disabled")); // profile age: sbStats.appendFreshSibling(new MooChatComponent.KeyValueChatComponent("Profile age", fancyFirstJoined.first()).setHover(new MooChatComponent.KeyValueTooltipComponent("Join date", (fancyFirstJoined.second() == null ? "today" : fancyFirstJoined.second())))); - // last save: - Pair fancyLastSave = activeProfile.getFancyLastSave(); - sbStats.appendFreshSibling(new MooChatComponent.KeyValueChatComponent("Last profile save", fancyLastSave != null ? fancyLastSave.first() + " ago" : "unknown").setHover(new MooChatComponent.KeyValueTooltipComponent("Last profile save", fancyLastSave != null ? (fancyLastSave.second() == null ? "today" : fancyLastSave.second()) : "unknown") - .appendFreshSibling(new MooChatComponent("= last time " + (activeProfile.coopCount() == 0 ? stalkedPlayer.getName() : EnumChatFormatting.RED + "someone from " + stalkedPlayer.getName() + "'s profile" + EnumChatFormatting.WHITE) + " has played SkyBlock.").white()))); main.getChatHelper().sendMessage(sbStats); } else { diff --git a/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java b/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java index 23bcfc5..493a3e8 100644 --- a/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java +++ b/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java @@ -60,7 +60,6 @@ public class HySkyBlockStats { public static class Profile { public boolean selected; - private long last_save; private String cute_name; private Map members; private String game_mode; @@ -96,10 +95,6 @@ public class HySkyBlockStats { } } - public Pair getFancyLastSave() { - return (last_save > 0) ? Utils.getDurationAsWords(last_save) : null; - } - public double getCoinBank() { return (banking != null) ? banking.balance : -1; } -- cgit