if (!player.getClan().isHaveAirshipLicense())
{
player.sendPacket(SystemMsg.AN_AIRSHIP_CANNOT_BE_SUMMONED_BECAUSE_EITHER_YOU_HAVE_NOT_REGISTERED_YOUR_AIRSHIP_LICENSE_OR_THE_AIRSHIP_HAS_NOT_YET_BEEN_SUMMONED);
return;
}
ClanAirShip dockedAirShip = getDockedAirShip();
ClanAirShip clanAirship = player.getClan().getAirship();
if (clanAirship != null)
{
if (clanAirship == dockedAirShip)
{
player.sendPacket(SystemMsg.THE_CLAN_OWNED_AIRSHIP_ALREADY_EXISTS);
}
else
{
player.sendPacket(SystemMsg.YOUR_CLANS_AIRSHIP_IS_ALREADY_BEING_USED_BY_ANOTHER_CLAN_MEMBER);
}
return;
}
if (dockedAirShip != null)
{
Functions.npcSay(this, NpcString.IN_AIR_HARBOR_ALREADY_AIRSHIP_DOCKED_PLEASE_WAIT_AND_TRY_AGAIN, ChatType.SHOUT, 5000);
return;
}
if (Functions.removeItem(player, ENERGY_STAR_STONE, 5) != 5)
{
player.sendPacket(new SystemMessage2(SystemMsg.AN_AIRSHIP_CANNOT_BE_SUMMONED_BECAUSE_YOU_DONT_HAVE_ENOUGH_S1).addItemName(ENERGY_STAR_STONE));
return;
}
ClanAirShip dockedShip = new ClanAirShip(player.getClan());
dockedShip.setDock(_dock);
dockedShip.setPlatform(_platform);
dockedShip.setHeading(0);
dockedShip.spawnMe(_platform.getSpawnLoc());
dockedShip.startDepartTask();
Functions.npcSay(this, NpcString.AIRSHIP_IS_SUMMONED_IS_DEPART_IN_5_MINUTES, ChatType.SHOUT, 5000);
}
else if (command.equalsIgnoreCase("register"))
{
if ((player.getClan() == null) || !player.isClanLeader() || (player.getClan().getLevel() < 5))