Class CookieStoreEvent.ForwardResult
java.lang.Object
com.velocitypowered.api.event.player.CookieStoreEvent.ForwardResult
- All Implemented Interfaces:
ResultedEvent.Result
- Enclosing class:
- CookieStoreEvent
public static final class CookieStoreEvent.ForwardResult
extends Object
implements ResultedEvent.Result
A result determining whether or not to forward the cookie on.
-
Method Summary
Modifier and TypeMethodDescriptiondata
(byte[] data) Allows the cookie to be forwarded to the client so that it can store it, but silently replaces the data of the cookie with another.forward()
Allows the cookie to be forwarded to the client so that it can store it.byte[]
getData()
getKey()
handled()
Prevents the cookie from being forwarded to the client, the cookie is handled by the proxy.boolean
Returns whether or not the event is allowed to proceed.Allows the cookie to be forwarded to the client so that it can store it, but silently replaces the identifier of the cookie with another.toString()
-
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 interfaceResultedEvent.Result
- Returns:
- whether or not the event is allowed to proceed
-
getKey
-
getData
public byte[] getData() -
toString
-
forward
Allows the cookie to be forwarded to the client so that it can store it.- Returns:
- the forward result
-
handled
Prevents the cookie from being forwarded to the client, the cookie is handled by the proxy.- Returns:
- the handled result
-
key
Allows the cookie to be forwarded to the client so that it can store it, 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
Allows the cookie to be forwarded to the client so that it can store it, 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
-