| Modifier and Type | Field and Description |
|---|---|
static int |
RUN_DELAY |
static long |
SESSION_LIFETIME |
| Constructor and Description |
|---|
SessionManager(WorldGuardPlugin plugin)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Session |
get(org.bukkit.entity.Player player)
Get a player's session.
|
Session |
getIfPresent(org.bukkit.entity.Player player)
Get a player's session, if one exists.
|
WorldGuardPlugin |
getPlugin()
Get the plugin.
|
boolean |
hasBypass(org.bukkit.entity.Player player,
org.bukkit.World world)
Check whether a player has the region bypass permission.
|
void |
onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) |
void |
resetAllStates()
Re-initialize handlers and clear "last position," "last state," etc.
|
void |
resetState(org.bukkit.entity.Player player)
Re-initialize handlers and clear "last position," "last state," etc.
|
void |
run() |
public static final int RUN_DELAY
public static final long SESSION_LIFETIME
public SessionManager(WorldGuardPlugin plugin)
plugin - The pluginpublic WorldGuardPlugin getPlugin()
public boolean hasBypass(org.bukkit.entity.Player player,
org.bukkit.World world)
The return value may be cached for a few seconds.
player - The playerworld - The worldpublic void resetAllStates()
public void resetState(org.bukkit.entity.Player player)
player - The player@Nullable public Session getIfPresent(org.bukkit.entity.Player player)
player - The playerpublic Session get(org.bukkit.entity.Player player)
This method can only be called from the main thread. While the session manager itself is thread-safe, some of the handlers may require initialization that requires the server main thread.
player - The player to get a session forplayer's sessionpublic void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event)
Copyright © 2015. All Rights Reserved.