mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 05:01:28 +00:00
Ignore teleport delay on portals,
fix cooldown not working if delay is disabled, fix cooldown for teleport.now() git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1517 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
1f23740832
commit
aeb46128bc
2 changed files with 11 additions and 1 deletions
|
@ -162,7 +162,7 @@ public class EssentialsPlayerListener extends PlayerListener
|
|||
event.setTo(loc);
|
||||
try
|
||||
{
|
||||
user.getTeleport().teleport(loc, new Charge("portal"));
|
||||
user.getTeleport().now(loc, new Charge("portal"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -190,6 +190,7 @@ public class Teleport implements Runnable
|
|||
cooldown(true);
|
||||
if (delay <= 0 || user.isAuthorized("essentials.teleport.timer.bypass"))
|
||||
{
|
||||
cooldown(false);
|
||||
now(target);
|
||||
if (chargeFor != null)
|
||||
{
|
||||
|
@ -217,11 +218,20 @@ public class Teleport implements Runnable
|
|||
|
||||
public void now(Location loc) throws Exception
|
||||
{
|
||||
cooldown(false);
|
||||
now(new Target(loc));
|
||||
}
|
||||
|
||||
public void now(Location loc, Charge chargeFor) throws Exception
|
||||
{
|
||||
cooldown(false);
|
||||
chargeFor.charge(user);
|
||||
now(new Target(loc));
|
||||
}
|
||||
|
||||
public void now(Entity entity) throws Exception
|
||||
{
|
||||
cooldown(false);
|
||||
now(new Target(entity));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue