Prevent tapping into System.currentTimeMillis for each onActionRequest.

This commit is contained in:
MobiusDevelopment
2019-11-03 04:55:36 +00:00
parent 01eaf9e042
commit a48b50ffbb
18 changed files with 36 additions and 36 deletions
@@ -3895,12 +3895,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3901,12 +3901,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3903,12 +3903,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3898,12 +3898,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3876,12 +3876,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3876,12 +3876,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3877,12 +3877,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3797,12 +3797,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -922,12 +922,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _protectEndTime > GameTimeController.getGameTicks();
return (_protectEndTime != 0) && (_protectEndTime > GameTimeController.getGameTicks());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > GameTimeController.getGameTicks();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > GameTimeController.getGameTicks());
}
/**
@@ -3937,12 +3937,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3848,12 +3848,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3870,12 +3870,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3871,12 +3871,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3854,12 +3854,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3865,12 +3865,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3865,12 +3865,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3768,12 +3768,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)
@@ -3871,12 +3871,12 @@ public class PlayerInstance extends Playable
public boolean isSpawnProtected()
{
return _spawnProtectEndTime > System.currentTimeMillis();
return (_spawnProtectEndTime != 0) && (_spawnProtectEndTime > System.currentTimeMillis());
}
public boolean isTeleportProtected()
{
return _teleportProtectEndTime > System.currentTimeMillis();
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > System.currentTimeMillis());
}
public void setSpawnProtection(boolean protect)