Package org.mvplugins.multiverse.portals
Class PortalPlayerSession
java.lang.Object
org.mvplugins.multiverse.portals.PortalPlayerSession
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the teleport cooldown is still in effect.booleandoTeleportPlayer(MoveType eventType) org.bukkit.LocationIf a player teleports from A - B, this method will report A even if the player is in B.This will ALWAYS return the portal a player is actually in.booleanbooleanbooleanvoidplayerDidTeleport(org.bukkit.Location location) This method should be called every time a player teleports to a portal.booleanselectPortal(MVPortal portal) voidsetDebugMode(boolean debugMode) booleansetLeftClickSelection(org.bukkit.util.Vector v, org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world) booleansetRightClickSelection(org.bukkit.util.Vector v, org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world) voidsetStaleLocation(boolean active) voidsetStaleLocation(org.bukkit.Location loc, MoveType moveType) voidsetTeleportTime(Date date) booleanbooleanshowDebugInfo(MVPortal portal)
-
Constructor Details
-
PortalPlayerSession
-
-
Method Details
-
selectPortal
-
getSelectedPortal
-
setDebugMode
public void setDebugMode(boolean debugMode) -
isDebugModeOn
public boolean isDebugModeOn() -
setStaleLocation
public void setStaleLocation(boolean active) -
isStaleLocation
public boolean isStaleLocation() -
doTeleportPlayer
-
getLocation
public org.bukkit.Location getLocation() -
setStaleLocation
-
setLeftClickSelection
public boolean setLeftClickSelection(org.bukkit.util.Vector v, org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world) -
setRightClickSelection
public boolean setRightClickSelection(org.bukkit.util.Vector v, org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world) -
getSelectedRegion
-
getStandingInPortal
If a player teleports from A - B, this method will report A even if the player is in B. This is done for hysteresis. For the exact detection please usegetUncachedStandingInPortal()- Returns:
- The
MVPortalthe player is standing in.
-
getUncachedStandingInPortal
This will ALWAYS return the portal a player is actually in. For hysteresis seegetStandingInPortal().- Returns:
- The
MVPortalthe player is standing in.
-
playerDidTeleport
public void playerDidTeleport(org.bukkit.Location location) This method should be called every time a player teleports to a portal.- Parameters:
location-
-
hasMovedOutOfPortal
public boolean hasMovedOutOfPortal() -
showDebugInfo
public boolean showDebugInfo() -
showDebugInfo
-
setTeleportTime
-
checkAndSendCooldownMessage
public boolean checkAndSendCooldownMessage()Checks if the teleport cooldown is still in effect. If it is, a message is sent to the player informing them.- Returns:
- True if the teleport cooldown is still in effect, false otherwise.
-