mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-03-13 15:20:12 +01:00
Removed teleport from PlayerSession.
This commit is contained in:
parent
a91991551c
commit
7d9060879c
@ -28,14 +28,22 @@ public class MVPlayerSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Teleport the Player to the destination as long as enough time has passed since the last teleport.
|
* Update the Teleport time.
|
||||||
* @param location
|
|
||||||
*/
|
*/
|
||||||
public void teleport(Location location){
|
public void teleport(){
|
||||||
|
this.teleportLast = (new Date()).getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Grab whether the cooldown on Portal use has expired or not.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean getTeleportable(){
|
||||||
Long time = (new Date()).getTime();
|
Long time = (new Date()).getTime();
|
||||||
if ((time - this.teleportLast) > config.getInt("portalcooldown", 5000)) {
|
if ((time - this.teleportLast) > config.getInt("portalcooldown", 5000)) {
|
||||||
this.player.teleportTo(location);
|
return true;
|
||||||
this.teleportLast = time;
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user