Class CommandExecuteEvent
java.lang.Object
com.velocitypowered.api.event.command.CommandExecuteEvent
- All Implemented Interfaces:
ResultedEvent<CommandExecuteEvent.CommandResult>
public final class CommandExecuteEvent
extends Object
implements ResultedEvent<CommandExecuteEvent.CommandResult>
This event is fired when someone executing command.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents the result of theCommandExecuteEvent.Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result -
Constructor Summary
ConstructorsConstructorDescriptionCommandExecuteEvent(CommandSource commandSource, String command) Constructs a CommandExecuteEvent. -
Method Summary
Modifier and TypeMethodDescriptionGets the original command being executed without first slash.Returns the result associated with this event.voidSets the result of this event.toString()
-
Constructor Details
-
CommandExecuteEvent
Constructs a CommandExecuteEvent.- Parameters:
commandSource- the source executing the commandcommand- the command being executed without first slash
-
-
Method Details
-
getCommandSource
-
getCommand
Gets the original command being executed without first slash.- Returns:
- the original command being executed
-
getResult
Description copied from interface:ResultedEventReturns the result associated with this event.- Specified by:
getResultin interfaceResultedEvent<CommandExecuteEvent.CommandResult>- Returns:
- the result of this event
-
setResult
Description copied from interface:ResultedEventSets the result of this event. The result must be non-null.- Specified by:
setResultin interfaceResultedEvent<CommandExecuteEvent.CommandResult>- Parameters:
result- the new result
-
toString
-