Prevent tapping into System.currentTimeMillis for each onActionRequest.
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user