package net.sf.l2j.gameserver.handler.usercommandhandlers;
import net.sf.l2j.gameserver.handler.IUserCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.TvT;
import net.sf.l2j.gameserver.util.Broadcast;
public class Join implements IUserCommandHandler
{
private static String[] _commands = {"join"};
public boolean useUserCommand(String command, L2PcInstance activeChar)
{
if (command.equals("join"))
{
if (Config.TvT_EVEN_TEAMS.equals("SHUFFLE"))
{
replyMSG.append("
");
replyMSG.append("Do you want to join the event?");
for (String team : _teams)
replyMSG.append("| " + team + " | ");
replyMSG.append("
");
}
if (Config.LMS_EVEN_TEAMS.equals("NO") || Config.TvT_EVEN_TEAMS.equals("BALANCE"))
{
replyMSG.append("");
replyMSG.append("Do you want to join the event?");
for (String team : _teams)
{
replyMSG.append("| " + team + " (" + teamPlayersCount(team) + " joined) | ");
replyMSG.append(" |
");
}
replyMSG.append("
");
}
else if (eventPlayer.getLevel()<_minlvl || eventPlayer.getLevel()>_maxlvl )
{
replyMSG.append("Your lvl is : " + eventPlayer.getLevel() +"
");
replyMSG.append("Min lvl to join : " + _minlvl + "
");
replyMSG.append("Max lvl to join : " + _maxlvl + "
");
replyMSG.append("You can't join this event.
");
}
}
}
}