npe and clan minimum players set for siege
This commit is contained in:
parent
9342bee371
commit
67d1bffe82
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user