private void doClanTeleport(L2PcInstance player, int val)
{
L2TeleportLocation list = TeleportLocationTable.getInstance().getTemplate(val);
if(!player.isClanLeader() && player.getClan() != null)
{
player.sendMessage("Solo El lider de Clan Puede Usar El Teleport");
return;
}
if(player.getClan() == null)
{
player.sendMessage("No Estas en un clan");
return;
}
for (L2PcInstance member : player.getClan().getOnlineMembers(""))
{
if ((member == null) || (member == player))
{
continue;
}
if (member.isInDuel() && ((member.getDuelId() != member.getDuelId())))
{
continue;
}
if (!member.isInsideRadius(player, 1000, false, false))
{
player.sendMessage("El Jugador " + member.getName() + " Esta muy Lejos y no sera teleportado.");
continue;
}
if (player.getClanId() == member.getClanId() && member.getLevel() >= 76 && member.getClan() != null && player.getClan() != null && member.getClanId() == player.getClanId())
{
member.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ());
member.sendMessage("Entrando A una Zona De Clan");
player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ());
}
else
{
player.sendMessage("No Cumples Los Requisitos.");
return;
}
}
}
Should be like this I think.
EDIT:
Also, player (clan leader) teleportation is in wrong place, because he will be teleported as many times as there is online members.