diff options
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection')
4 files changed, 15 insertions, 9 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java index 13db747..6debc4e 100644 --- a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java +++ b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java @@ -1062,9 +1062,13 @@ public class MooCommand extends CommandBase { } private void sendCommandUsage(ICommandSender sender) { + IChatComponent dungeonOverlayHint = MooConfig.dungOverlayEnabled + ? new MooChatComponent("\n").reset().white().appendText(EnumChatFormatting.DARK_GREEN + " ❢" + EnumChatFormatting.LIGHT_PURPLE + EnumChatFormatting.ITALIC + " To move the Dungeons overlay: " + EnumChatFormatting.WHITE + "/" + getCommandName() + " config " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "SB Dungeons " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "Dungeon Performance Overlay") + : null; + IChatComponent usage = new MooChatComponent("➜ " + Cowlection.MODNAME + " commands:").gold().bold() .appendSibling(createCmdHelpEntry("config", "Open mod's configuration")) - .appendSibling(new MooChatComponent("\n").reset().white().appendText(EnumChatFormatting.DARK_GREEN + " ❢" + EnumChatFormatting.LIGHT_PURPLE + EnumChatFormatting.ITALIC + " To move the Dungeons overlay: " + EnumChatFormatting.WHITE + "/" + getCommandName() + " config " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "SB Dungeons " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "Dungeon Performance Overlay")) + .appendSibling(dungeonOverlayHint) .appendSibling(new MooChatComponent("\n").reset().gray().appendText(EnumChatFormatting.DARK_GREEN + " ❢" + EnumChatFormatting.GRAY + EnumChatFormatting.ITALIC + " Commands marked with §d§l⚷" + EnumChatFormatting.GRAY + EnumChatFormatting.ITALIC + " require a valid API key")) .appendSibling(createCmdHelpSection(1, "Best friends, friends & other players")) .appendSibling(createCmdHelpEntry("stalk", "Get info of player's status §d§l⚷")) diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java index 87f6330..92632f3 100644 --- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java +++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java @@ -614,13 +614,13 @@ public class MooConfig { "Does " + EnumChatFormatting.ITALIC + "not" + EnumChatFormatting.RESET + " track explorer score " + EnumChatFormatting.GRAY + "(explored rooms, secrets, ...)"); Property propDungSendPerformanceOnDeath = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungSendPerformanceOnDeath", true, "Send dungeon performance after a player died?")); + "dungSendPerformanceOnDeath", false, "Send dungeon performance after a player died?")); Property propDungSendPerformanceOnEndScreen = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungSendPerformanceOnEndScreen", true, "Send dungeon performance on end screen?")); + "dungSendPerformanceOnEndScreen", false, "Send dungeon performance on end screen?")); Property propDungOverlayEnabled = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungOverlayEnabled", true, "Enable Dungeon performance overlay?")); + "dungOverlayEnabled", false, "Enable Dungeon performance overlay?")); Property propDungOverlayPositionX = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), "dungOverlayPositionX", 6, "Dungeon performance overlay position: x value", 0, 1000), diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java index 74cd137..f2c653c 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java @@ -692,12 +692,12 @@ public class DungeonsListener { if (e.type == RenderGameOverlayEvent.ElementType.ALL) { DungeonCache dungeonCache = main.getDungeonCache(); - if (dungeonCache.isInDungeon()) { - dungeonCache.fetchScoreboardData(); - } - boolean isEditingDungeonOverlaySettings = MooConfigGui.showDungeonPerformanceOverlay(); if (MooConfig.dungOverlayEnabled && dungeonCache.isInDungeon() || isEditingDungeonOverlaySettings) { + if (dungeonCache.isInDungeon()) { + dungeonCache.fetchScoreboardData(); + } + ArrayList<String> dungeonPerformanceEntries = new ArrayList<>(); int maxSkillScore = dungeonCache.getMaxSkillScore(); int totalDeaths = dungeonCache.getTotalDeaths(); diff --git a/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java b/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java index 5500345..56b57fe 100644 --- a/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java +++ b/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java @@ -164,7 +164,9 @@ public class MooChatComponent extends ChatComponentText { @Override public MooChatComponent appendSibling(IChatComponent component) { - super.appendSibling(component); + if (component != null) { + super.appendSibling(component); + } return this; } |