npe and clan minimum players set for siege

This commit is contained in:
NewGarbo 2016-02-09 19:47:42 +00:00
parent 9342bee371
commit 67d1bffe82

View File

@ -66,8 +66,14 @@ public class SiegeManager extends MiniPlugin
{
ClanTerritory territory = _clans.getClanUtility().getClaim(projectile.getLocation());
if (ClansBlacklist.isValidClanName(territory.Owner) && !territory.Owner.equals(clan.getName()))
if (territory != null && ClansBlacklist.isValidClanName(territory.Owner) && !territory.Owner.equals(clan.getName()))
{
if (clan.getOnlinePlayerCount() < 2)
{
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;
}
_outpostManager.Get(clan).declareOn(player, _clans.getClanUtility().getClanByClanName(territory.Owner));
}
else