类 CommandEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.CommandEvent
public class CommandEvent
extends net.minecraftforge.eventbus.api.Event
CommandEvent is fired after a command is parsed, but before it is executed.
This event is fired during the invocation of
Commands.performCommand(ParseResults, String)
.
This event is cancellable, and does not have a result. If the event is cancelled, the command will not be executed.
This event is fired on the main Forge event bus, only on the logical server.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段修饰符和类型字段说明private @Nullable Throwable
private com.mojang.brigadier.ParseResults
<CommandSourceStack> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明@Nullable Throwable
返回 an exception to be thrown when performing the command, starts null。com.mojang.brigadier.ParseResults
<CommandSourceStack> 返回 the parsed command results。void
setException
(@Nullable Throwable exception) void
setParseResults
(com.mojang.brigadier.ParseResults<CommandSourceStack> parse) 从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
parse
-
exception
-
-
构造器详细资料
-
CommandEvent
-
-
方法详细资料
-
getParseResults
返回 the parsed command results。- 返回:
- the parsed command results
-
setParseResults
-
getException
返回 an exception to be thrown when performing the command, starts null。- 返回:
- an exception to be thrown when performing the command, starts null
-
setException
-