Class PostCommandInvocationEvent

java.lang.Object
com.velocitypowered.api.event.command.PostCommandInvocationEvent

public final class PostCommandInvocationEvent extends Object
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 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 command
      command - the command being executed without first slash
      result - the result of this command
  • Method Details

    • getCommandSource

      @NotNull public @NotNull CommandSource getCommandSource()
      Get the source of this executed command.
      Returns:
      the source
    • getCommand

      @NotNull public @NotNull String getCommand()
      Gets the original command line executed without the first slash.
      Returns:
      the original command
      See Also:
    • getResult

      @NotNull public @NotNull CommandResult getResult()
      Returns the result of the command execution.
      Returns:
      the execution result
    • toString

      public String toString()
      Overrides:
      toString in class Object