mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-02 11:11:58 +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();
|
config.load();
|
||||||
noGodWorlds = new HashSet<String>(config.getStringList("no-god-in-worlds"));
|
noGodWorlds = new HashSet<String>(config.getStringList("no-god-in-worlds"));
|
||||||
enabledSigns = _getEnabledSigns();
|
enabledSigns = _getEnabledSigns();
|
||||||
|
teleportInvulnerabilityTime = _getTeleportInvulnerability();
|
||||||
teleportInvulnerability = _isTeleportInvulnerability();
|
teleportInvulnerability = _isTeleportInvulnerability();
|
||||||
disableItemPickupWhileAfk = _getDisableItemPickupWhileAfk();
|
disableItemPickupWhileAfk = _getDisableItemPickupWhileAfk();
|
||||||
registerBackInListener = _registerBackInListener();
|
registerBackInListener = _registerBackInListener();
|
||||||
@ -956,13 +957,19 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
this.metricsEnabled = metricsEnabled;
|
this.metricsEnabled = metricsEnabled;
|
||||||
}
|
}
|
||||||
private boolean teleportInvulnerability;
|
private long teleportInvulnerabilityTime;
|
||||||
|
|
||||||
|
public long _getTeleportInvulnerability()
|
||||||
|
{
|
||||||
|
return config.getLong("teleport-invulnerability", 0) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getTeleportInvulnerability()
|
public long getTeleportInvulnerability()
|
||||||
{
|
{
|
||||||
return config.getLong("teleport-invulnerability", 0) * 1000;
|
return teleportInvulnerabilityTime;
|
||||||
}
|
}
|
||||||
|
private boolean teleportInvulnerability;
|
||||||
|
|
||||||
private boolean _isTeleportInvulnerability()
|
private boolean _isTeleportInvulnerability()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user