diff options
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java | 10 | ||||
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/listener/ChatListener.java | 11 | ||||
-rw-r--r-- | update.json | 6 |
5 files changed, 19 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b6c4355..3b97d9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [1.8.9-0.11.0] - unreleased +## [1.8.9-0.11.0] - 28.09.2020 ### Added - SkyBlock Dungeons Party: new command `/moo dungeon party` - short alias: `/m dp`): @@ -227,7 +227,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). *Note:* The 'best friends' list is currently available via <kbd>ESC</kbd> > Mod Options > Cowlection > Config > bestFriends. -[1.8.9-0.11.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.10.2...master +[1.8.9-0.11.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.10.2...v1.8.9-0.11.0 [1.8.9-0.10.2]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.10.1...v1.8.9-0.10.2 [1.8.9-0.10.1]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.10.0...v1.8.9-0.10.1 [1.8.9-0.10.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.9.0...v1.8.9-0.10.0 diff --git a/gradle.properties b/gradle.properties index 9b82066..32c5727 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_name=Cowlection group_package=de.cowtipper.cowlection -mod_version=0.10.2 +mod_version=0.11.0 git_url=https://github.com/cow-mc/Cowlection/ mc_version=1.8.9 diff --git a/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java b/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java index 335f7fc..b268406 100644 --- a/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java +++ b/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java @@ -302,13 +302,17 @@ public class HySkyBlockStats { Map<String, Type> latestDungeonType = Utils.getLastNMapEntries(dungeon_types, 1); for (Map.Entry<String, Type> dungeonTypeEntry : latestDungeonType.entrySet()) { - output.append(spacer); + if (!indent) { + output.append(spacer); + } if (dungeonTypeEntry != null) { Map<String, Integer> highestFloorCompletions = Utils.getLastNMapEntries(dungeonTypeEntry.getValue().getTierCompletions(), nHighestFloors); String latestDungeonTypeName = Utils.fancyCase(dungeonTypeEntry.getKey()); if (highestFloorCompletions != null) { // top n highest floor completions: - output.append(spacer).append(EnumChatFormatting.BOLD).append(highestFloorCompletions.size()).append(" highest ").append(latestDungeonTypeName).append(" floors:"); + String highest = highestFloorCompletions.size() > 1 ? highestFloorCompletions.size() + " highest " : "Highest "; + String pluralS = highestFloorCompletions.size() > 1 ? "s" : ""; + output.append(spacer).append(EnumChatFormatting.BOLD).append(highest).append(latestDungeonTypeName).append(" floor").append(pluralS).append(":"); for (Map.Entry<String, Integer> highestFloorEntry : highestFloorCompletions.entrySet()) { int highestFloorHighestScore = dungeonTypeEntry.getValue().getBestScore().get(highestFloorEntry.getKey()); @@ -317,7 +321,7 @@ public class HySkyBlockStats { } } else { // no floor completions yet - output.append(EnumChatFormatting.ITALIC).append("No ").append(latestDungeonTypeName).append(" floor completions yet"); + output.append(spacer).append(EnumChatFormatting.ITALIC).append("No ").append(latestDungeonTypeName).append(" floor completions yet"); } } } diff --git a/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java b/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java index e7bec03..0c601d7 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java @@ -188,16 +188,17 @@ public class ChatListener { // player hasn't played SkyBlock but joined via dungeon party finder? Maybe an API error return; } + boolean outputAsChatMessages = MooConfig.getDungPartyFinderPlayerLookupDisplay() == MooConfig.Setting.TEXT; + HySkyBlockStats.Profile.Member member = activeProfile.getMember(stalkedPlayer.getUuid()); MooChatComponent armorLookupComponent; String armorLookupPrefix = " ❈ " + EnumChatFormatting.DARK_GREEN + playerName; - MooConfig.Setting dungPartyFinderPlayerLookupDisplay = MooConfig.getDungPartyFinderPlayerLookupDisplay(); - String delimiter = "\n" + (dungPartyFinderPlayerLookupDisplay == MooConfig.Setting.TEXT ? " " : ""); + String delimiter = "\n" + (outputAsChatMessages ? " " : ""); String armorLookupResult = EnumChatFormatting.LIGHT_PURPLE + " ➜ " + EnumChatFormatting.GRAY + dungeonClass + delimiter + String.join(delimiter, member.getArmor()); HySkyBlockStats.Profile.Dungeons dungeons = member.getDungeons(); - String highestFloorCompletions = "\n" + EnumChatFormatting.GRAY + "Completed no dungeons yet"; - if (dungPartyFinderPlayerLookupDisplay == MooConfig.Setting.TEXT) { + String highestFloorCompletions = "\n" + (outputAsChatMessages ? " " : "") + EnumChatFormatting.GRAY + "Completed no dungeons yet"; + if (outputAsChatMessages) { // highest floor completions: if (dungeons != null && dungeons.hasPlayed()) { highestFloorCompletions = dungeons.getHighestFloorCompletions(1, true).toString(); @@ -212,7 +213,7 @@ public class ChatListener { armorLookupComponent = new MooChatComponent(armorLookupPrefix + EnumChatFormatting.GREEN + (playerName.endsWith("s") ? "'" : "'s") + " dungeons info (hover me)").green() .setHover(new MooChatComponent(EnumChatFormatting.BOLD + playerName + armorLookupResult + highestFloorCompletions)); } - main.getChatHelper().sendMessage(armorLookupComponent.setSuggestCommand("/p kick " + playerName, dungPartyFinderPlayerLookupDisplay == MooConfig.Setting.TEXT)); + main.getChatHelper().sendMessage(armorLookupComponent.setSuggestCommand("/p kick " + playerName, outputAsChatMessages)); } }); } diff --git a/update.json b/update.json index 95c5400..00402df 100644 --- a/update.json +++ b/update.json @@ -1,10 +1,10 @@ { "homepage": "https://github.com/cow-mc/Cowlection/", "1.8.9": { - "1.8.9-0.10.2": "https://github.com/cow-mc/Cowlection/blob/master/CHANGELOG.md" + "1.8.9-0.11.0": "https://github.com/cow-mc/Cowlection/blob/master/CHANGELOG.md" }, "promos": { - "1.8.9-latest": "1.8.9-0.10.2", - "1.8.9-recommended": "1.8.9-0.10.2" + "1.8.9-latest": "1.8.9-0.11.0", + "1.8.9-recommended": "1.8.9-0.11.0" } } |