Cache teleport invulnerability time

This commit is contained in:
GunfighterJ 2013-02-20 07:30:29 -06:00 committed by KHobbits
parent c9efe14ad3
commit bf0a11e4fe

View File

@ -465,6 +465,7 @@ public class Settings implements ISettings
config.load();
noGodWorlds = new HashSet<String>(config.getStringList("no-god-in-worlds"));
enabledSigns = _getEnabledSigns();
teleportInvulnerabilityTime = _getTeleportInvulnerability();
teleportInvulnerability = _isTeleportInvulnerability();
disableItemPickupWhileAfk = _getDisableItemPickupWhileAfk();
registerBackInListener = _registerBackInListener();
@ -956,13 +957,19 @@ public class Settings implements ISettings
{
this.metricsEnabled = metricsEnabled;
}
private boolean teleportInvulnerability;
private long teleportInvulnerabilityTime;
public long _getTeleportInvulnerability()
{
return config.getLong("teleport-invulnerability", 0) * 1000;
}
@Override
public long getTeleportInvulnerability()
{
return config.getLong("teleport-invulnerability", 0) * 1000;
return teleportInvulnerabilityTime;
}
private boolean teleportInvulnerability;
private boolean _isTeleportInvulnerability()
{