From 9689e79d86b39757fe745a4492d4ab3de4c5fd00 Mon Sep 17 00:00:00 2001 From: ProSavage Date: Wed, 24 Oct 2018 10:30:29 -0500 Subject: [PATCH] Added ability to configure where warbanners are placed. Basically now you can disable the warbanner placement in enemy territory or vice versa. --- .../massivecraft/factions/listeners/FactionsBlockListener.java | 3 ++- src/main/resources/config.yml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/listeners/FactionsBlockListener.java b/src/main/java/com/massivecraft/factions/listeners/FactionsBlockListener.java index 5fd88870..787cf08d 100644 --- a/src/main/java/com/massivecraft/factions/listeners/FactionsBlockListener.java +++ b/src/main/java/com/massivecraft/factions/listeners/FactionsBlockListener.java @@ -372,7 +372,8 @@ public class FactionsBlockListener implements Listener { Location placedLoc = e.getBlockPlaced().getLocation(); FLocation fplacedLoc = new FLocation(placedLoc); - if (Board.getInstance().getFactionAt(fplacedLoc).isWarZone() || fme.getFaction().getRelationTo(Board.getInstance().getFactionAt(fplacedLoc)) == Relation.ENEMY) { + if ((Board.getInstance().getFactionAt(fplacedLoc).isWarZone() && SavageFactions.plugin.getConfig().getBoolean("fbanners.Placeable.Warzone")) + || (fme.getFaction().getRelationTo(Board.getInstance().getFactionAt(fplacedLoc)) == Relation.ENEMY) && SavageFactions.plugin.getConfig().getBoolean("fbanners.Placeable.Enemy")) { if (bannerCooldownMap.containsKey(fme.getTag())) { fme.msg(TL.WARBANNER_COOLDOWN); e.setCancelled(true); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 57c203bc..cf2f8d5f 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -959,6 +959,9 @@ fbanners: - INCREASE_DAMAGE:2 - SPEED:2 BannerHolo: '&c{Faction}''s War Banner' + Placeable: + Warzone: true + Enemy: true #Title when moving between chunks Title: