| Modifier and Type | Field and Description |
|---|---|
static int |
EXPIRATION_GRACE |
| Constructor and Description |
|---|
SessionManager(WorldEdit worldEdit)
Create a new session manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Remove all sessions.
|
boolean |
contains(SessionOwner owner)
Get whether a session exists for the given owner.
|
LocalSession |
findByName(String name)
Find a session by its name specified by
SessionKey.getName(). |
LocalSession |
get(SessionOwner owner)
Get the session for an owner and create one if one doesn't exist.
|
LocalSession |
getIfPresent(SessionOwner owner)
Gets the session for an owner and return it if it exists, otherwise
return
null. |
protected UUID |
getKey(SessionKey key)
Get the key to use in the map for a
SessionKey. |
protected UUID |
getKey(SessionOwner owner)
Get the key to use in the map for an owner.
|
void |
onConfigurationLoad(ConfigurationLoadEvent event) |
void |
remove(SessionOwner owner)
Remove the session for the given owner if one exists.
|
public SessionManager(WorldEdit worldEdit)
worldEdit - a WorldEdit instancepublic boolean contains(SessionOwner owner)
owner - the owner@Nullable public LocalSession findByName(String name)
SessionKey.getName().name - the namenull@Nullable public LocalSession getIfPresent(SessionOwner owner)
null.owner - the ownerpublic LocalSession get(SessionOwner owner)
owner - the ownerprotected UUID getKey(SessionOwner owner)
owner - the ownerprotected UUID getKey(SessionKey key)
SessionKey.key - the session key objectpublic void remove(SessionOwner owner)
owner - the ownerpublic void clear()
public void onConfigurationLoad(ConfigurationLoadEvent event)
Copyright © 2010-2014. All Rights Reserved.