public class SessionCache extends Object
Constructor and Description |
---|
SessionCache()
Class Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSession(UserData data)
Add a session to the UserData object if it is cached and has been ended.
|
void |
endSession(UUID uuid)
Ends a session for a player at the current moment.
|
Map<UUID,SessionData> |
getActiveSessions()
Used to get the Map of active sessions.
|
SessionData |
getSession(UUID uuid)
Used to get the SessionData of the player in the sessionCache.
|
void |
startSession(UUID uuid)
Starts a session for a player at the current moment.
|
public void startSession(UUID uuid)
uuid
- UUID of the player.public void endSession(UUID uuid)
uuid
- UUID of the player.public SessionData getSession(UUID uuid)
uuid
- UUId of the player.public void addSession(UserData data)
data
- UserData object a session should be added to.public Map<UUID,SessionData> getActiveSessions()
Copyright © 2017. All rights reserved.