Package me.mrnavastar.biscuit.api
Interface CookieJar
- All Known Implementing Classes:
ServerCommonNetworkHandlerMixin,ServerLoginNetworkHandlerMixin,ServerPlayerEntityMixin
public interface CookieJar
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> CompletableFuture<T> Retrieves the cookie stored on the client.default voidStore a cookie on the client.default voidTransfer the client to another server.booleanChecks if this client was transferred from another server.
-
Method Details
-
transfer
Transfer the client to another server.- Parameters:
address- The address of the server to transfer to.port- The port of the server to transfer to.
-
wasTransferred
boolean wasTransferred()Checks if this client was transferred from another server. NOTE: The client is able to lie about being transferred, so don't rely on it for mission critical things. Also seeBiscuit.RegisteredCookie.kickIfMissing(boolean)- Returns:
- If the client was transferred.
-
setCookie
Store a cookie on the client.- Parameters:
cookie- the object to store on the client.
-
getCookie
Retrieves the cookie stored on the client.- Parameters:
cookieType- The class type of the object to be retrieved.- Returns:
- The object that was stored on the client.
-