diff options
author | GunfighterJ <joseph.jenniges@gmail.com> | 2013-02-20 07:30:29 -0600 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-02-20 13:46:28 +0000 |
commit | bf0a11e4fefec2c86c565794174b9c86ed37e126 (patch) | |
tree | 3ce78bb970575830978e36a72619d7d096228b12 | |
parent | c9efe14ad354e97df65b7b04b83528baef1be6b4 (diff) | |
download | Essentials-bf0a11e4fefec2c86c565794174b9c86ed37e126.tar Essentials-bf0a11e4fefec2c86c565794174b9c86ed37e126.tar.gz Essentials-bf0a11e4fefec2c86c565794174b9c86ed37e126.tar.lz Essentials-bf0a11e4fefec2c86c565794174b9c86ed37e126.tar.xz Essentials-bf0a11e4fefec2c86c565794174b9c86ed37e126.zip |
Cache teleport invulnerability time
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Settings.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 8dd6e6fbf..a24f3d807 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -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() { |