mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-09 20:41:23 +01:00
Cache teleport invulnerability time
This commit is contained in:
parent
c9efe14ad3
commit
bf0a11e4fe
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user