Class CommandExecuteEvent.CommandResult

    • Method Detail

      • isForwardToServer

        public boolean isForwardToServer()
      • isAllowed

        public boolean isAllowed()
        Description copied from interface: ResultedEvent.Result
        Returns whether or not the event is allowed to proceed. Plugins may choose to skip denied events, and the proxy will respect the result of this method.
        Specified by:
        isAllowed in interface ResultedEvent.Result
        Returns:
        whether or not the event is allowed to proceed
      • forwardToServer

        public static CommandExecuteEvent.CommandResult forwardToServer()
        Prevents the command from being executed, but forward command to server.
        Returns:
        the forward result
      • forwardToServer

        public static CommandExecuteEvent.CommandResult forwardToServer​(@NonNull String newCommand)
        Prevents the command from being executed on proxy, but forward command to server.
        Parameters:
        newCommand - the command without first slash to use instead
        Returns:
        a result with a new command being forwarded to server
      • command

        public static CommandExecuteEvent.CommandResult command​(@NonNull String newCommand)
        Allows the command to be executed, but silently replaced old command with another.
        Parameters:
        newCommand - the command to use instead without first slash
        Returns:
        a result with a new command