Class InfoCommand
java.lang.Object
io.github.theword.queqiao.core.command.SubCommand
io.github.theword.queqiao.core.command.subCommand.server.InfoCommand
-
Field Summary
Fields inherited from class io.github.theword.queqiao.core.command.SubCommand
children, parent -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.github.theword.queqiao.core.command.SubCommand
addChild, execute, getChildren, getFullPath, getFullPermissionNode, getParent, getPermissionNode, getUsage, isRoot, sendCommandTree
-
Constructor Details
-
InfoCommand
public InfoCommand()
-
-
Method Details
-
getName
获取命令名称- Specified by:
getNamein classSubCommand- Returns:
- info
-
getDescription
获取命令描述- Specified by:
getDescriptionin classSubCommand- Returns:
- 获取 Websocket Server 信息
-
onExecute
获取 WebSocket 服务端状态 整合游戏内命令调用连接集合只读取一次:此前
getConnections()被调用三次 (判空 / 取数量 / 遍历),三次之间集合可能变化, 会出现"显示 N 个连接、却列出 M 条"的自相矛盾输出。- Specified by:
onExecutein classSubCommand- Parameters:
commandReturner- 命令执行者args- 命令参数
-