Class CookieRequestEvent
java.lang.Object
com.velocitypowered.api.event.player.CookieRequestEvent
- All Implemented Interfaces:
ResultedEvent<CookieRequestEvent.ForwardResult>
@AwaitingEvent
public final class CookieRequestEvent
extends Object
implements ResultedEvent<CookieRequestEvent.ForwardResult>
This event is fired when a cookie from a client is requested either by a proxy plugin or
by a backend server. Velocity will wait on this event to finish firing before discarding the
cookie request (if handled) or forwarding it to the client.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A result determining whether or not to forward the cookie request on.Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the result associated with this event.void
Sets the result of this event.toString()
-
Constructor Details
-
CookieRequestEvent
Creates a new instance.- Parameters:
player
- the player from whom the cookies is requestedkey
- the identifier of the cookie
-
-
Method Details
-
getResult
Description copied from interface:ResultedEvent
Returns the result associated with this event.- Specified by:
getResult
in interfaceResultedEvent<CookieRequestEvent.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<CookieRequestEvent.ForwardResult>
- Parameters:
result
- the new result
-
getPlayer
-
getOriginalKey
-
toString
-