Class PostCommandInvocationEvent
java.lang.Object
com.velocitypowered.api.event.command.PostCommandInvocationEvent
This event is fired when velocity executed a command. This event is called after the event
is handled.
Commands can be cancelled or forwarded to backend servers in CommandExecuteEvent
.
This will prevent firing this event.
- Since:
- 3.3.0
-
Constructor Summary
ConstructorDescriptionPostCommandInvocationEvent
(@NotNull CommandSource commandSource, @NotNull String command, @NotNull CommandResult result) Constructs a PostCommandInvocationEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull String
Gets the original command line executed without the first slash.@NotNull CommandSource
Get the source of this executed command.@NotNull CommandResult
Returns the result of the command execution.toString()
-
Constructor Details
-
PostCommandInvocationEvent
public PostCommandInvocationEvent(@NotNull @NotNull CommandSource commandSource, @NotNull @NotNull String command, @NotNull @NotNull CommandResult result) Constructs a PostCommandInvocationEvent.- Parameters:
commandSource
- the source executing the commandcommand
- the command being executed without first slashresult
- the result of this command
-
-
Method Details
-
getCommandSource
Get the source of this executed command.- Returns:
- the source
-
getCommand
Gets the original command line executed without the first slash.- Returns:
- the original command
- See Also:
-
getResult
Returns the result of the command execution.- Returns:
- the execution result
-
toString
-