1.19高版本中 ParseResult 类和 dispatcher.execute() 的使用
请注意时效性!文章创建于:2023-08-05
Dispatcher
从 1.19 之后 getCommandManager().execute()
中 execute()
第一个形参从 ServerCommandSource
类变成了 ParseResult<ServerCommandSource>
类了。
看了下,ParseResult
似乎是对命令解析的返回结果,包含 CommandContext<ServerCommandSource>
和 ImmutableStringReader
其他类或接口在内构成了一个解析的结果,导向消息的发送人、指令的内容和抛出的异常。
没有办法直接从 CommandContext<ServerCommandSource>
类中获取到解析结果,必须使用 dispatcher
指令调度器进行解析。
1 |
|
1.19高版本中 ParseResult 类和 dispatcher.execute() 的使用
http://htext.top/post/f4139b0d.html