mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-22 10:15:51 +01:00
Fixed block break protection. Removed grief info messages for now
This commit is contained in:
parent
c44c9108f8
commit
9404eb77ff
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user