ChatComponentHelpMenu

基本信息

属性 值
类 mypermissions.command.core.chat.ChatComponentHelpMenu
父类 myessentials.chat.api.ChatComponentMultiPage

功能

为 CommandTreeNode.sendHelpMessage 渲染分页帮助菜单。每条子命令一行:{7| <CommandLine> << <localizedHelp>};自定义页头 {9| - Command: }{9o|<localizedSyntax>}。

构造

  • 构造函数 ChatComponentHelpMenu(int maxComponentsPerPage, CommandTreeNode command),在构造体内 construct() 自动遍历子节点并加入。

关键覆盖

方法 行为
construct() 对每个子节点的 commandLine + <perm>.help 本地化串 → 拼接成 ChatComponentFormatted 放进分页
getHeader(page) 在父类 header 之上追加当前根节点的本地化 syntax

相关条目