Added ability to configure where warbanners are placed.
Basically now you can disable the warbanner placement in enemy territory or vice versa.
This commit is contained in:
parent
18140eee75
commit
9689e79d86
@ -372,7 +372,8 @@ public class FactionsBlockListener implements Listener {
|
|||||||
|
|
||||||
Location placedLoc = e.getBlockPlaced().getLocation();
|
Location placedLoc = e.getBlockPlaced().getLocation();
|
||||||
FLocation fplacedLoc = new FLocation(placedLoc);
|
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())) {
|
if (bannerCooldownMap.containsKey(fme.getTag())) {
|
||||||
fme.msg(TL.WARBANNER_COOLDOWN);
|
fme.msg(TL.WARBANNER_COOLDOWN);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
@ -959,6 +959,9 @@ fbanners:
|
|||||||
- INCREASE_DAMAGE:2
|
- INCREASE_DAMAGE:2
|
||||||
- SPEED:2
|
- SPEED:2
|
||||||
BannerHolo: '&c{Faction}''s War Banner'
|
BannerHolo: '&c{Faction}''s War Banner'
|
||||||
|
Placeable:
|
||||||
|
Warzone: true
|
||||||
|
Enemy: true
|
||||||
|
|
||||||
#Title when moving between chunks
|
#Title when moving between chunks
|
||||||
Title:
|
Title:
|
||||||
|
Loading…
Reference in New Issue
Block a user