bugfix - admins could not place signs etc in safezones
This commit is contained in:
parent
fdd8a89327
commit
d71c0e86d7
@ -1,5 +1,5 @@
|
|||||||
name: Factions
|
name: Factions
|
||||||
version: 1.1
|
version: 1.1.1
|
||||||
main: com.bukkit.mcteam.factions.Factions
|
main: com.bukkit.mcteam.factions.Factions
|
||||||
commands:
|
commands:
|
||||||
f:
|
f:
|
||||||
|
@ -102,6 +102,7 @@ public class FactionsBlockListener extends BlockListener {
|
|||||||
Faction myFaction = me.getFaction();
|
Faction myFaction = me.getFaction();
|
||||||
Faction otherFaction = Board.getFactionAt(new FLocation(block));
|
Faction otherFaction = Board.getFactionAt(new FLocation(block));
|
||||||
|
|
||||||
|
// In safe zones you may use any block...
|
||||||
if (otherFaction.isNormal() && myFaction != otherFaction) {
|
if (otherFaction.isNormal() && myFaction != otherFaction) {
|
||||||
me.sendMessage("You can't use "+TextUtil.getMaterialName(material)+" 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;
|
return false;
|
||||||
|
@ -159,11 +159,20 @@ public class FactionsPlayerListener extends PlayerListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
FPlayer me = FPlayer.get(player);
|
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();
|
Faction myFaction = me.getFaction();
|
||||||
|
|
||||||
// Cancel if we are not in our own territory
|
// Cancel if we are not in our own territory
|
||||||
if (myFaction != otherFaction) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user