Class CookieStoreEvent
java.lang.Object
com.velocitypowered.api.event.player.CookieStoreEvent
- All Implemented Interfaces:
ResultedEvent<CookieStoreEvent.ForwardResult>
@AwaitingEvent
public final class CookieStoreEvent
extends Object
implements ResultedEvent<CookieStoreEvent.ForwardResult>
This event is fired when a cookie should be stored on a player's client. This process can be
initiated either by a proxy plugin or by a backend server. Velocity will wait on this event
to finish firing before discarding the cookie (if handled) or forwarding it to the client so
that it can store the cookie.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A result determining whether or not to forward the cookie on.Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
Constructor Summary
ConstructorDescriptionCookieStoreEvent
(Player player, Key key, byte[] data) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the result associated with this event.void
Sets the result of this event.toString()
-
Constructor Details
-
CookieStoreEvent
Creates a new instance.- Parameters:
player
- the player who should store the cookiekey
- 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<CookieStoreEvent.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<CookieStoreEvent.ForwardResult>
- Parameters:
result
- the new result
-
getPlayer
-
getOriginalKey
-
getOriginalData
public byte[] getOriginalData() -
toString
-