diff --git a/plugin.yml b/plugin.yml index 7f628b2c..5532bbbe 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,5 +1,5 @@ name: Factions -version: 1.1 +version: 1.1.1 main: com.bukkit.mcteam.factions.Factions commands: f: diff --git a/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java b/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java index 72f0e97e..61cb137b 100644 --- a/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java +++ b/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java @@ -102,6 +102,7 @@ public class FactionsBlockListener extends BlockListener { Faction myFaction = me.getFaction(); Faction otherFaction = Board.getFactionAt(new FLocation(block)); + // In safe zones you may use any block... if (otherFaction.isNormal() && myFaction != otherFaction) { me.sendMessage("You can't use "+TextUtil.getMaterialName(material)+" in the territory of "+otherFaction.getTag(myFaction)); return false; diff --git a/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java b/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java index c746e27a..946c7305 100644 --- a/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java +++ b/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java @@ -159,11 +159,20 @@ public class FactionsPlayerListener extends PlayerListener{ } FPlayer me = FPlayer.get(player); + + if (otherFaction.isSafeZone()) { + if (Factions.hasPermManageSafeZone(player)) { + return true; + } + me.sendMessage("You can't use "+TextUtil.getMaterialName(material)+" in a safe zone."); + return false; + } + Faction myFaction = me.getFaction(); // Cancel if we are not in our own territory if (myFaction != otherFaction) { - me.sendMessage("You can't use that in the territory of "+otherFaction.getTag(myFaction)); + me.sendMessage("You can't use "+TextUtil.getMaterialName(material)+" in the territory of "+otherFaction.getTag(myFaction)); return false; }