Class ServerLoginPluginMessageEvent.ResponseResult

java.lang.Object
com.velocitypowered.api.event.player.ServerLoginPluginMessageEvent.ResponseResult
All Implemented Interfaces:
ResultedEvent.Result
Enclosing class:
ServerLoginPluginMessageEvent

public static class ServerLoginPluginMessageEvent.ResponseResult extends Object implements ResultedEvent.Result
The result class, containing a response to the login plugin message sent by the server.
  • Method Details

    • 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
    • getResponse

      public byte[] getResponse()
      Returns the response to the message.
      Returns:
      the response to the message
      Throws:
      IllegalStateException - if there is no reply (an unknown message)
    • unknown

      Returns a result indicating that this login plugin message was not handled by the proxy.
      Returns:
      the unknown response result
    • reply

      public static ServerLoginPluginMessageEvent.ResponseResult reply(byte[] response)
      Returns a result with a reply to the server's login plugin message.
      Parameters:
      response - the response bytes to send
      Returns:
      a response result containing the response data
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object