New conf.json option "homesTeleportCommandEnabled" which can be used to disable the /f home command, while possibly leaving faction homes enabled for the "homesTeleportToOnDeath" functionality

This commit is contained in:
Brettflan 2011-06-28 18:29:14 -05:00
parent a9619a73c0
commit b66b102333
2 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,7 @@ public class Conf {
public static boolean homesEnabled = true; public static boolean homesEnabled = true;
public static boolean homesMustBeInClaimedTerritory = true; public static boolean homesMustBeInClaimedTerritory = true;
public static boolean homesTeleportToOnDeath = true; public static boolean homesTeleportToOnDeath = true;
public static boolean homesTeleportCommandEnabled = true;
public static boolean homesTeleportAllowedFromEnemyTerritory = true; public static boolean homesTeleportAllowedFromEnemyTerritory = true;
public static double homesTeleportAllowedEnemyDistance = 32; public static double homesTeleportAllowedEnemyDistance = 32;

View File

@ -30,6 +30,11 @@ public class FCommandHome extends FBaseCommand {
return; return;
} }
if ( ! Conf.homesTeleportCommandEnabled) {
me.sendMessage("Sorry, the ability to teleport to Faction homes is disabled on this server.");
return;
}
Faction myFaction = me.getFaction(); Faction myFaction = me.getFaction();
if ( ! myFaction.hasHome()) { if ( ! myFaction.hasHome()) {