Class CookieReceiveEvent
java.lang.Object
com.velocitypowered.api.event.player.CookieReceiveEvent
- All Implemented Interfaces:
ResultedEvent<CookieReceiveEvent.ForwardResult>
@AwaitingEvent
public final class CookieReceiveEvent
extends Object
implements ResultedEvent<CookieReceiveEvent.ForwardResult>
This event is fired when a cookie response from a client is received by the proxy.
This usually happens after either a proxy plugin or a backend server requested a cookie.
Velocity will wait on this event to finish firing before discarding the
received cookie (if handled) or forwarding it to the backend server.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A result determining whether or not to forward the cookie response on.Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
Constructor Summary
ConstructorDescriptionCookieReceiveEvent
(Player player, Key key, byte @Nullable [] data) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbyte @Nullable []
Returns the result associated with this event.void
Sets the result of this event.toString()
-
Constructor Details
-
CookieReceiveEvent
Creates a new instance.- Parameters:
player
- the player who sent the cookie responsekey
- the identifier of the cookiedata
- the data of the cookie
-
-
Method Details
-
getResult
Description copied from interface:ResultedEvent
Returns the result associated with this event.- Specified by:
getResult
in interfaceResultedEvent<CookieReceiveEvent.ForwardResult>
- Returns:
- the result of this event
-
setResult
Description copied from interface:ResultedEvent
Sets the result of this event. The result must be non-null.- Specified by:
setResult
in interfaceResultedEvent<CookieReceiveEvent.ForwardResult>
- Parameters:
result
- the new result
-
getPlayer
-
getOriginalKey
-
getOriginalData
public byte @Nullable [] getOriginalData() -
toString
-