Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
ccetl committed Feb 18, 2025
1 parent cc31fda commit 2761e6c
Showing 1 changed file with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import net.ccbluex.liquidbounce.features.command.builder.pageParameter
import net.ccbluex.liquidbounce.lang.translation
import net.ccbluex.liquidbounce.utils.chat.removeMessage
import net.ccbluex.liquidbounce.utils.client.*
import net.ccbluex.liquidbounce.utils.text.RunnableClickEvent
import net.ccbluex.liquidbounce.utils.text.asText
import net.minecraft.client.gui.screen.ChatScreen
import net.minecraft.text.HoverEvent
Expand Down Expand Up @@ -163,29 +164,31 @@ object CommandHelp : CommandFactory {
chat(
"".asText()
.styled { it.withColor(Formatting.GRAY) }
.append("<--".asText()
.styled {
it.withClickEvent(RunnableClickEvent {
printMessage(
command,
previousPage,
maxPage,
commands
)
})
}
.styled {
it.withHoverEvent(HoverEvent(HoverEvent.Action.SHOW_TEXT, command.result("previous")))
}
.append(
"<--".asText()
.styled {
it.withClickEvent(RunnableClickEvent {
printMessage(
command,
previousPage,
maxPage,
commands
)
})
}
.styled {
it.withHoverEvent(HoverEvent(HoverEvent.Action.SHOW_TEXT, command.result("previous")))
}
)
.append("[$page]")
.append("-->".asText()
.styled {
it.withClickEvent(RunnableClickEvent { printMessage(command, nextPage, maxPage, commands) })
}
.styled {
it.withHoverEvent(HoverEvent(HoverEvent.Action.SHOW_TEXT, command.result("next")))
}
.append(
"-->".asText()
.styled {
it.withClickEvent(RunnableClickEvent { printMessage(command, nextPage, maxPage, commands) })
}
.styled {
it.withHoverEvent(HoverEvent(HoverEvent.Action.SHOW_TEXT, command.result("next")))
}
),
metadata = MessageMetadata(id = "CommandHelp#Next")
)
Expand Down

0 comments on commit 2761e6c

Please sign in to comment.