From 5ea055a260274e8739cce4dd31fef4b34afc47d3 Mon Sep 17 00:00:00 2001 From: "Andy \"Spathi\" F" Date: Mon, 29 Aug 2011 14:54:04 +0200 Subject: [PATCH] WorldGuard regions will block factions claiming them --- src/com/massivecraft/factions/FPlayer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index 5ac1350d..a060e082 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -508,6 +508,12 @@ public class FPlayer { FLocation flocation = new FLocation(this); 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 (notifyFailure) sendMessage("You already own this land.");