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

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