WorldGuard regions will block factions claiming them

This commit is contained in:
Andy "Spathi" F 2011-08-29 14:54:04 +02:00
parent 55c9067e34
commit 5ea055a260

View File

@ -508,6 +508,12 @@ public class FPlayer {
FLocation flocation = new FLocation(this); FLocation flocation = new FLocation(this);
Faction otherFaction = Board.getFactionAt(flocation); Faction otherFaction = Board.getFactionAt(flocation);
if (Worldguard.checkForRegions(this.getPlayer().getLocation())) {
// Checks for WorldGuard regions in the chunk attempting to be claimed
sendMessage("This land is protected");
return false;
}
if (myFaction == otherFaction) { if (myFaction == otherFaction) {
if (notifyFailure) if (notifyFailure)
sendMessage("You already own this land."); sendMessage("You already own this land.");