WorldGuard regions will block factions claiming them
This commit is contained in:
parent
55c9067e34
commit
5ea055a260
@ -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.");
|
||||||
|
Loading…
Reference in New Issue
Block a user