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();
|
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()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user