Add the ability to disable teleport safety. Requested by a few people - teleport safety isn't always a good thing for some servers. Request is cancelled if not safe.

This commit is contained in:
Joshua Popoff 2013-12-12 22:03:15 -08:00 committed by Chris Ward
parent b70b58660f
commit 7d8d9d8959
25 changed files with 51 additions and 2 deletions

View file

@ -95,6 +95,19 @@ public class Settings implements net.ess3.api.ISettings
return chatRadius;
}
private boolean teleportSafety;
public boolean _isTeleportSafetyEnabled()
{
return config.getBoolean("teleport-safety", true);
}
@Override
public boolean isTeleportSafetyEnabled()
{
return teleportSafety;
}
@Override
public double getTeleportDelay()
{
@ -487,6 +500,7 @@ public class Settings implements net.ess3.api.ISettings
config.load();
noGodWorlds = new HashSet<String>(config.getStringList("no-god-in-worlds"));
enabledSigns = _getEnabledSigns();
teleportSafety = _isTeleportSafetyEnabled();
teleportInvulnerabilityTime = _getTeleportInvulnerability();
teleportInvulnerability = _isTeleportInvulnerability();
disableItemPickupWhileAfk = _getDisableItemPickupWhileAfk();