public class PlayerCache
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PlayerCache.LastLocation
Last recorded position before de-authentication.
|
Modifier and Type | Field and Description |
---|---|
boolean |
isAuthenticated
Whether player is authenticated.
|
java.lang.String |
lastIp
Last recorded IP of player.
|
PlayerCache.LastLocation |
lastLocation |
int |
loginTries
Stores how many times player has tried to login.
|
java.lang.String |
password
Hashed password of player.
|
long |
validUntil
Time until session is valid.
|
boolean |
wasInPortal
Player stats before de-authentication.
|
Constructor and Description |
---|
PlayerCache() |
Modifier and Type | Method and Description |
---|---|
static PlayerCache |
fromJson(net.minecraft.server.network.ServerPlayerEntity player,
java.lang.String fakeUuid)
Creates an empty cache for player (when player doesn't exist in DB).
|
java.lang.String |
toJson() |
@Expose @SerializedName(value="is_authenticated") public boolean isAuthenticated
session validation
.@Expose public java.lang.String password
public int loginTries
@Expose @SerializedName(value="last_ip") public java.lang.String lastIp
sessions
.@Expose @SerializedName(value="valid_until") public long validUntil
public boolean wasInPortal
public final PlayerCache.LastLocation lastLocation
public static PlayerCache fromJson(net.minecraft.server.network.ServerPlayerEntity player, java.lang.String fakeUuid)
player
- player to create cache forpublic java.lang.String toJson()