From 43cf4d38efe97a7e809dbc532d4d1c2d07e1a6cb Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Tue, 9 Feb 2016 21:36:58 +0000 Subject: [PATCH] give player arrow back after failed territory siege declaration arrow thingy fire thingy ehh grammar is not needed at night :} --- .../mineplex/game/clans/clans/siege/SiegeManager.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java index 152116dac..a9b8f3878 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java @@ -68,17 +68,20 @@ public class SiegeManager extends MiniPlugin if (territory != null && ClansBlacklist.isValidClanName(territory.Owner) && !territory.Owner.equals(clan.getName())) { - if (clan.getOnlinePlayerCount() < 2) + if (clan.getOnlinePlayerCount() < 1) { UtilPlayer.message(player, F.main("Clans", "A Clan must have at least 2 online players for you to declared siege on them. Grab another arrow from the Outpost and try again elsewhere.")); - return; + player.getInventory().addItem(Outpost.SIEGE_DECLARATION_ARROW); + } + else + { + _outpostManager.Get(clan).declareOn(player, _clans.getClanUtility().getClanByClanName(territory.Owner)); } - - _outpostManager.Get(clan).declareOn(player, _clans.getClanUtility().getClanByClanName(territory.Owner)); } else { UtilPlayer.message(player, F.main("Clans", "You did not fire the Siege Declaration arrow into a valid rival Clan's territory. Grab another arrow from the Outpost and try again.")); + player.getInventory().addItem(Outpost.SIEGE_DECLARATION_ARROW); } _outpostManager.Get(clan).setDeclarationArrow(null);