mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-22 06:12:56 +02:00
Cache teleport invulnerability time
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user