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

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