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 
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.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate @Nullable Throwableprivate com.mojang.brigadier.ParseResults<CommandSourceStack>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription@Nullable ThrowableReturns an exception to be thrown when performing the command, starts null.com.mojang.brigadier.ParseResults<CommandSourceStack>Returns the parsed command results.voidsetException(@Nullable Throwable exception) voidsetParseResults(com.mojang.brigadier.ParseResults<CommandSourceStack> parse) Methods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
parse
- 
exception
 
- 
- 
Constructor Details- 
CommandEvent
 
- 
- 
Method Details- 
getParseResultsReturns the parsed command results.- Returns:
- the parsed command results
 
- 
setParseResults
- 
getExceptionReturns an exception to be thrown when performing the command, starts null.- Returns:
- an exception to be thrown when performing the command, starts null
 
- 
setException
 
-