Class CookieReceiveEvent.ForwardResult

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

public static final class CookieReceiveEvent.ForwardResult extends Object implements ResultedEvent.Result
A result determining whether or not to forward the cookie response on.
  • 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
    • getKey

      public Key getKey()
    • getData

      public byte[] getData()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • forward

      public static CookieReceiveEvent.ForwardResult forward()
      Allows the cookie response to be forwarded to the backend server.
      Returns:
      the forward result
    • handled

      public static CookieReceiveEvent.ForwardResult handled()
      Prevents the cookie response from being forwarded to the backend server, the cookie response is handled by the proxy.
      Returns:
      the handled result
    • key

      public static CookieReceiveEvent.ForwardResult key(Key key)
      Allows the cookie response to be forwarded to the backend server, but silently replaces the identifier of the cookie with another.
      Parameters:
      key - the identifier to use instead
      Returns:
      a result with a new key
    • data

      public static CookieReceiveEvent.ForwardResult data(byte[] data)
      Allows the cookie response to be forwarded to the backend server, but silently replaces the data of the cookie with another.
      Parameters:
      data - the data of the cookie to use instead
      Returns:
      a result with new data