From 9404eb77ff52af7e694c4aa16028cbce561cc04d Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sat, 26 Feb 2011 10:33:31 +0100 Subject: [PATCH] Fixed block break protection. Removed grief info messages for now --- .../mcteam/factions/listeners/FactionsBlockListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java b/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java index e515ce31..f0175df9 100644 --- a/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java +++ b/src/com/bukkit/mcteam/factions/listeners/FactionsBlockListener.java @@ -34,7 +34,7 @@ public class FactionsBlockListener extends BlockListener { if (event.isCancelled()) { return; // Alright. lets listen to that. } - if (event.getDamageLevel() == BlockDamageLevel.BROKEN && ! this.playerCanBuildDestroyBlock(event.getPlayer(), event.getBlock(), "destroy")) { + if (event.getDamageLevel() == BlockDamageLevel.STOPPED && ! this.playerCanBuildDestroyBlock(event.getPlayer(), event.getBlock(), "destroy")) { event.setCancelled(true); } } @@ -53,7 +53,7 @@ public class FactionsBlockListener extends BlockListener { // Cancel if we are not in our own territory if (myFaction != otherFaction) { me.sendMessage(Conf.colorSystem+"You can't "+action+" in the territory of "+otherFaction.getTag(myFaction)); - otherFaction.sendMessage(me.getNameAndRelevant(otherFaction)+Conf.colorSystem+" tried to "+action+" "+TextUtil.getMaterialName(block.getType())+" in your territory"); + //otherFaction.sendMessage(me.getNameAndRelevant(otherFaction)+Conf.colorSystem+" tried to "+action+" "+TextUtil.getMaterialName(block.getType())+" in your territory"); return false; } @@ -94,7 +94,7 @@ public class FactionsBlockListener extends BlockListener { if (otherFaction.id != 0 && myFaction != otherFaction) { me.sendMessage(Conf.colorSystem+"You can't use "+TextUtil.getMaterialName(material)+" in the territory of "+otherFaction.getTag(myFaction)); - otherFaction.sendMessage(me.getNameAndRelevant(otherFaction)+Conf.colorSystem+" tried to use "+TextUtil.getMaterialName(material)+" in your territory"); + //otherFaction.sendMessage(me.getNameAndRelevant(otherFaction)+Conf.colorSystem+" tried to use "+TextUtil.getMaterialName(material)+" in your territory"); return false; } return true;