From cc8a3dba69e8f1474a33a7e47b32d452f11735fd Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:28:06 +0200 Subject: Feature: /shnavigate (#2575) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../at/hannibal2/skyhanni/features/commands/HelpCommand.kt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/commands') diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/HelpCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/HelpCommand.kt index 1890c6293..0f07c47f8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/HelpCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/HelpCommand.kt @@ -5,13 +5,10 @@ import at.hannibal2.skyhanni.utils.StringUtils.splitLines import at.hannibal2.skyhanni.utils.chat.Text import at.hannibal2.skyhanni.utils.chat.Text.asComponent import at.hannibal2.skyhanni.utils.chat.Text.center -import at.hannibal2.skyhanni.utils.chat.Text.fitToChat import at.hannibal2.skyhanni.utils.chat.Text.hover import at.hannibal2.skyhanni.utils.chat.Text.onClick import at.hannibal2.skyhanni.utils.chat.Text.send -import at.hannibal2.skyhanni.utils.chat.Text.style import at.hannibal2.skyhanni.utils.chat.Text.suggest -import net.minecraft.util.EnumChatFormatting import net.minecraft.util.IChatComponent import kotlin.math.ceil @@ -20,11 +17,6 @@ object HelpCommand { private const val COMMANDS_PER_PAGE = 15 private const val HELP_ID = -6457563 - private fun createDivider() = Text.HYPHEN.fitToChat().style { - strikethrough = true - color = EnumChatFormatting.BLUE - } - private fun createCommandEntry(command: Commands.CommandInfo): IChatComponent { val category = command.category val color = category.color @@ -60,7 +52,7 @@ object HelpCommand { val text = mutableListOf() - text.add(createDivider()) + text.add(Text.createDivider()) text.add(title.asComponent().center()) text.add( Text.join( @@ -77,7 +69,7 @@ object HelpCommand { } else null, ).center(), ) - text.add(createDivider()) + text.add(Text.createDivider()) if (filtered.isEmpty()) { text.add(Text.EMPTY) @@ -91,7 +83,7 @@ object HelpCommand { } } - text.add(createDivider()) + text.add(Text.createDivider()) Text.multiline(text).send(HELP_ID) } -- cgit