aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2020-09-28 01:51:24 +0200
committerCow <cow@volloeko.de>2020-09-28 01:51:24 +0200
commit0a731e512f1556ca22006419b409110338a7d4ed (patch)
tree2fa5c89f2e4e760cdb5490ecdbbc823a3894a773 /src/main/java/de/cowtipper
parent2ae3dcc299f0504f5bd11a65fd132ad718c5da54 (diff)
downloadCowlection-0a731e512f1556ca22006419b409110338a7d4ed.tar.gz
Cowlection-0a731e512f1556ca22006419b409110338a7d4ed.tar.bz2
Cowlection-0a731e512f1556ca22006419b409110338a7d4ed.zip
Bumped version to 1.8.9-0.11.0
- also fixed some wrong indentations
Diffstat (limited to 'src/main/java/de/cowtipper')
-rw-r--r--src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java10
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/ChatListener.java11
2 files changed, 13 insertions, 8 deletions
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));
}
});
}