mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-05 06:07:54 +02:00
Commit 1001
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1027 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -139,7 +139,7 @@ public class User extends PlayerExtension implements Comparable<User>
|
|||||||
long now = Calendar.getInstance().getTimeInMillis();
|
long now = Calendar.getInstance().getTimeInMillis();
|
||||||
long cooldown = Essentials.getSettings().getTeleportCooldown();
|
long cooldown = Essentials.getSettings().getTeleportCooldown();
|
||||||
long left = lastTeleport + cooldown - now;
|
long left = lastTeleport + cooldown - now;
|
||||||
if (left > 0 && !isOp() && !isAuthorized("essentials.teleport.cooldown.bypass"))
|
if ((left > 0 && !isOp() && !isAuthorized("essentials.teleport.cooldown.bypass")) | !isJailed())
|
||||||
throw new Exception("Time before next teleport: " + Essentials.FormatTime(left));
|
throw new Exception("Time before next teleport: " + Essentials.FormatTime(left));
|
||||||
// if justCheck is set, don't update lastTeleport; we're just checking
|
// if justCheck is set, don't update lastTeleport; we're just checking
|
||||||
if (!justCheck) lastTeleport = now;
|
if (!justCheck) lastTeleport = now;
|
||||||
@@ -385,6 +385,7 @@ public class User extends PlayerExtension implements Comparable<User>
|
|||||||
|
|
||||||
public void teleportTo(final Location loc, final String chargeFor)
|
public void teleportTo(final Location loc, final String chargeFor)
|
||||||
{
|
{
|
||||||
|
|
||||||
final long delay = Essentials.getSettings().getTeleportDelay();
|
final long delay = Essentials.getSettings().getTeleportDelay();
|
||||||
|
|
||||||
if (delay <= 0 || isOp() || isAuthorized("essentials.teleport.timer.bypass"))
|
if (delay <= 0 || isOp() || isAuthorized("essentials.teleport.timer.bypass"))
|
||||||
@@ -434,6 +435,7 @@ public class User extends PlayerExtension implements Comparable<User>
|
|||||||
|
|
||||||
public void teleportTo(final Entity entity, final String chargeFor)
|
public void teleportTo(final Entity entity, final String chargeFor)
|
||||||
{
|
{
|
||||||
|
|
||||||
final long delay = Essentials.getSettings().getTeleportDelay();
|
final long delay = Essentials.getSettings().getTeleportDelay();
|
||||||
|
|
||||||
if (delay <= 0 || isOp() || isAuthorized("essentials.teleport.timer.bypass"))
|
if (delay <= 0 || isOp() || isAuthorized("essentials.teleport.timer.bypass"))
|
||||||
|
Reference in New Issue
Block a user