From 5a5355f5edce22786bce325d45f176cbca402a96 Mon Sep 17 00:00:00 2001 From: PhanaticD Date: Sat, 29 Dec 2018 10:06:01 -0500 Subject: [PATCH] add ally to factionframework buildable --- src/com/projectkorra/projectkorra/GeneralMethods.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/GeneralMethods.java b/src/com/projectkorra/projectkorra/GeneralMethods.java index 56868880..ef88f972 100644 --- a/src/com/projectkorra/projectkorra/GeneralMethods.java +++ b/src/com/projectkorra/projectkorra/GeneralMethods.java @@ -44,6 +44,7 @@ import me.markeh.factionsframework.entities.FPlayer; import me.markeh.factionsframework.entities.FPlayers; import me.markeh.factionsframework.entities.Faction; import me.markeh.factionsframework.entities.Factions; +import me.markeh.factionsframework.enums.Rel; import me.ryanhamshire.GriefPrevention.Claim; import me.ryanhamshire.GriefPrevention.GriefPrevention; import net.md_5.bungee.api.chat.ClickEvent; @@ -1430,8 +1431,9 @@ public class GeneralMethods { if (facsfw != null && respectFactions) { FPlayer fPlayer = FPlayers.getBySender(player); Faction faction = Factions.getFactionAt(location); + Rel relation = fPlayer.getRelationTo(faction); - return !(faction.isNone() || fPlayer.getFaction().equals(faction)); + return !(faction.isNone() || fPlayer.getFaction().equals(faction) || relation == Rel.ALLY); } if (twnp != null && respectTowny) {