Class CommandExecuteEventImpl
- java.lang.Object
-
- com.velocitypowered.api.event.command.CommandExecuteEventImpl
-
- All Implemented Interfaces:
CommandExecuteEvent,Event,ResultedEvent<CommandExecuteEvent.CommandResult>
public final class CommandExecuteEventImpl extends Object implements CommandExecuteEvent
This event is fired when someone executing command.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.command.CommandExecuteEvent
CommandExecuteEvent.CommandResult
-
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
-
Constructor Summary
Constructors Constructor Description CommandExecuteEventImpl(CommandSource commandSource, String command)Constructs a CommandExecuteEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringrawCommand()Gets the original command being executed without first slash.CommandExecuteEvent.CommandResultresult()Returns the result associated with this event.voidsetResult(CommandExecuteEvent.CommandResult result)Sets the result of this event.CommandSourcesource()StringtoString()
-
-
-
Constructor Detail
-
CommandExecuteEventImpl
public CommandExecuteEventImpl(CommandSource commandSource, String command)
Constructs a CommandExecuteEvent.- Parameters:
commandSource- the source executing the commandcommand- the command being executed without first slash
-
-
Method Detail
-
source
public CommandSource source()
- Specified by:
sourcein interfaceCommandExecuteEvent
-
rawCommand
public String rawCommand()
Gets the original command being executed without first slash.- Specified by:
rawCommandin interfaceCommandExecuteEvent- Returns:
- the original command being executed
-
result
public CommandExecuteEvent.CommandResult result()
Description copied from interface:ResultedEventReturns the result associated with this event.- Specified by:
resultin interfaceResultedEvent<CommandExecuteEvent.CommandResult>- Returns:
- the result of this event
-
setResult
public void setResult(CommandExecuteEvent.CommandResult result)
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
-
-