From 3981ca4dde28991d1df03e6620574415d2ff70c0 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sat, 15 Oct 2011 12:46:09 -0500 Subject: [PATCH] Added fence gates to default "territoryProtectedMaterials" list. Existing users should run these commands to add it to an existing config, if desired: /f config territoryProtectedMaterials FENCE_GATE /f config territoryProtectedMaterialsWhenOffline FENCE_GATE Also changed first letter of "canLeaveWithNegativePower" setting to lowercase, to fit with Java standards. If you had previously changed this setting to false, you'll need to do so again. --- src/com/massivecraft/factions/Conf.java | 4 +++- src/com/massivecraft/factions/FPlayer.java | 2 +- src/com/massivecraft/factions/cmd/CmdJoin.java | 2 +- src/com/massivecraft/factions/cmd/CmdKick.java | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index 6fd86426..273a60db 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -43,7 +43,7 @@ public class Conf public static boolean showEnemyFactionsOnMap = true; // Disallow joining/leaving/kicking while power is negative - public static boolean CanLeaveWithNegativePower = true; + public static boolean canLeaveWithNegativePower = true; // Configuration for faction-only chat public static boolean factionOnlyChat = true; @@ -250,6 +250,7 @@ public class Conf territoryProtectedMaterials.add(Material.WOODEN_DOOR); territoryProtectedMaterials.add(Material.TRAP_DOOR); + territoryProtectedMaterials.add(Material.FENCE_GATE); territoryProtectedMaterials.add(Material.DISPENSER); territoryProtectedMaterials.add(Material.CHEST); territoryProtectedMaterials.add(Material.FURNACE); @@ -264,6 +265,7 @@ public class Conf territoryProtectedMaterialsWhenOffline.add(Material.WOODEN_DOOR); territoryProtectedMaterialsWhenOffline.add(Material.TRAP_DOOR); + territoryProtectedMaterialsWhenOffline.add(Material.FENCE_GATE); territoryProtectedMaterialsWhenOffline.add(Material.DISPENSER); territoryProtectedMaterialsWhenOffline.add(Material.CHEST); territoryProtectedMaterialsWhenOffline.add(Material.FURNACE); diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index b717fbab..3da00e0b 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -577,7 +577,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator return; } - if (!Conf.CanLeaveWithNegativePower && this.getPower() < 0) + if (!Conf.canLeaveWithNegativePower && this.getPower() < 0) { msg("You cannot leave until your power is positive."); return; diff --git a/src/com/massivecraft/factions/cmd/CmdJoin.java b/src/com/massivecraft/factions/cmd/CmdJoin.java index 961d2c5c..6fccc08f 100644 --- a/src/com/massivecraft/factions/cmd/CmdJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdJoin.java @@ -47,7 +47,7 @@ public class CmdJoin extends FCommand return; } - if (!Conf.CanLeaveWithNegativePower && fme.getPower() < 0) + if (!Conf.canLeaveWithNegativePower && fme.getPower() < 0) { msg("You cannot join a faction until your power is positive."); return; diff --git a/src/com/massivecraft/factions/cmd/CmdKick.java b/src/com/massivecraft/factions/cmd/CmdKick.java index e1e953d7..7880314e 100644 --- a/src/com/massivecraft/factions/cmd/CmdKick.java +++ b/src/com/massivecraft/factions/cmd/CmdKick.java @@ -57,7 +57,7 @@ public class CmdKick extends FCommand return; } - if ( ! Conf.CanLeaveWithNegativePower && you.getPower() < 0) + if ( ! Conf.canLeaveWithNegativePower && you.getPower() < 0) { msg("You cannot kick that member until their power is positive."); return;