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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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());
}
/**

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)