Package net.minecraftforge.event
Class 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
This event is
If the event is canceled, the execution of the command does not occur.
This event does not have a result.
This event is fired on the
Commands.performCommand(CommandSourceStack, String)
. parse
contains the instance of ParseResults
for the parsed command.exception
begins null, but can be populated with an exception to be thrown within the command.This event is
Cancelable
. If the event is canceled, the execution of the command does not occur.
This event does not have a result.
Event.HasResult
This event is fired on the
MinecraftForge.EVENT_BUS
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate Throwable
private com.mojang.brigadier.ParseResults<CommandSourceStack>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.ParseResults<CommandSourceStack>
void
setException
(Throwable exception) void
setParseResults
(com.mojang.brigadier.ParseResults<CommandSourceStack> parse) Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
parse
-
exception
-
-
Constructor Details
-
CommandEvent
-
-
Method Details
-
getParseResults
-
setParseResults
-
getException
-
setException
-