Added soil to the default "territoryProtectedMaterials" and "territoryProtectedMaterialsWhenOffline" settings, so people who aren't in your faction won't be able to trample crops in your territory (soil trampling is handled as an Interact event, for whatever reason)

For servers updating from older versions of Factions, you should use these commands to update your configuration:
f config territoryProtectedMaterials SOIL
f config territoryProtectedMaterialsWhenOffline SOIL
This commit is contained in:
Brettflan 2011-12-18 08:39:52 -06:00
parent 281021ce46
commit b3796c31f2
2 changed files with 3 additions and 1 deletions

@ -277,6 +277,7 @@ public class Conf
territoryProtectedMaterials.add(Material.BREWING_STAND); territoryProtectedMaterials.add(Material.BREWING_STAND);
territoryProtectedMaterials.add(Material.ENCHANTMENT_TABLE); territoryProtectedMaterials.add(Material.ENCHANTMENT_TABLE);
territoryProtectedMaterials.add(Material.CAULDRON); territoryProtectedMaterials.add(Material.CAULDRON);
territoryProtectedMaterials.add(Material.SOIL);
territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL); territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterials.add(Material.BUCKET); territoryDenyUseageMaterials.add(Material.BUCKET);
@ -296,6 +297,7 @@ public class Conf
territoryProtectedMaterialsWhenOffline.add(Material.BREWING_STAND); territoryProtectedMaterialsWhenOffline.add(Material.BREWING_STAND);
territoryProtectedMaterialsWhenOffline.add(Material.ENCHANTMENT_TABLE); territoryProtectedMaterialsWhenOffline.add(Material.ENCHANTMENT_TABLE);
territoryProtectedMaterialsWhenOffline.add(Material.CAULDRON); territoryProtectedMaterialsWhenOffline.add(Material.CAULDRON);
territoryProtectedMaterialsWhenOffline.add(Material.SOIL);
territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL); territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET); territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET);

@ -441,7 +441,7 @@ public class FactionsPlayerListener extends PlayerListener
if (rel.isNeutral() || (rel.isEnemy() && Conf.territoryEnemyProtectMaterials) || (rel.isAlly() && Conf.territoryAllyProtectMaterials)) if (rel.isNeutral() || (rel.isEnemy() && Conf.territoryEnemyProtectMaterials) || (rel.isAlly() && Conf.territoryAllyProtectMaterials))
{ {
if (!justCheck) if (!justCheck)
me.msg("<b>You can't use <h>%s<b> in the territory of <h>%s<b>.", TextUtil.getMaterialName(material), otherFaction.getTag(myFaction)); me.msg("<b>You can't %s <h>%s<b> in the territory of <h>%s<b>.", (material == Material.SOIL ? "trample" : "use"), TextUtil.getMaterialName(material), otherFaction.getTag(myFaction));
return false; return false;
} }