From b66b102333682f8889d6b7a4210b338c3345e9fa Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 28 Jun 2011 18:29:14 -0500 Subject: [PATCH] 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 --- src/org/mcteam/factions/Conf.java | 1 + src/org/mcteam/factions/commands/FCommandHome.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/org/mcteam/factions/Conf.java b/src/org/mcteam/factions/Conf.java index 68758e5d..64d86743 100644 --- a/src/org/mcteam/factions/Conf.java +++ b/src/org/mcteam/factions/Conf.java @@ -62,6 +62,7 @@ public class Conf { public static boolean homesEnabled = true; public static boolean homesMustBeInClaimedTerritory = true; public static boolean homesTeleportToOnDeath = true; + public static boolean homesTeleportCommandEnabled = true; public static boolean homesTeleportAllowedFromEnemyTerritory = true; public static double homesTeleportAllowedEnemyDistance = 32; diff --git a/src/org/mcteam/factions/commands/FCommandHome.java b/src/org/mcteam/factions/commands/FCommandHome.java index de35b658..ab5c4e59 100644 --- a/src/org/mcteam/factions/commands/FCommandHome.java +++ b/src/org/mcteam/factions/commands/FCommandHome.java @@ -29,6 +29,11 @@ public class FCommandHome extends FBaseCommand { me.sendMessage("Sorry, Faction homes are disabled on this server."); return; } + + if ( ! Conf.homesTeleportCommandEnabled) { + me.sendMessage("Sorry, the ability to teleport to Faction homes is disabled on this server."); + return; + } Faction myFaction = me.getFaction();