public class DataCache extends SessionCache
Contains:
plugin
Constructor and Description |
---|
DataCache(Plan plugin)
Class Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheSavedNames() |
void |
endFirstSessionActionTracking(UUID uuid) |
void |
firstSessionMessageSent(UUID uuid) |
String |
getDisplayName(UUID uuid)
Used to get the player display name in the cache.
|
int |
getFirstSessionMsgCount(UUID uuid) |
Map<UUID,Integer> |
getFirstSessionMsgCounts() |
String |
getName(UUID uuid)
Used to get the player name in the cache.
|
Set<UUID> |
getUuids() |
boolean |
isFirstSession(UUID uuid)
Check if a session is player's first session on the server.
|
void |
markFirstSession(UUID uuid)
Used for marking first Session Actions to be saved.
|
void |
updateNames(UUID uuid,
String playerName,
String displayName)
Used to update PlayerName and DisplayName caches.
|
cacheSession, endSession, getActiveSessions, getCachedSession, refreshActiveSessionsState
public DataCache(Plan plugin)
plugin
- Current instance of Planpublic void updateNames(UUID uuid, String playerName, String displayName)
uuid
- UUID of the player.playerName
- Name of the player.displayName
- DisplayName of the player.public void cacheSavedNames()
public String getName(UUID uuid)
uuid
- UUID of the player.public String getDisplayName(UUID uuid)
If not cached, one from the database will be cached.
uuid
- UUID of the player.public void markFirstSession(UUID uuid)
uuid
- UUID of the new player.public boolean isFirstSession(UUID uuid)
uuid
- UUID of the playerpublic void endFirstSessionActionTracking(UUID uuid)
public void firstSessionMessageSent(UUID uuid)
public int getFirstSessionMsgCount(UUID uuid)
Copyright © 2017. All rights reserved.