if (t.countTokens() < 2)
{
return;
}
t.nextToken();
KrateisCubeEvent cubeEvent = EventHolder.getInstance().getEvent(EventType.PVP_EVENT, Integer.parseInt(t.nextToken()));
if (cubeEvent == null)
{
return;
}
if ((player.getLevel() < cubeEvent.getMinLevel()) || (player.getLevel() > cubeEvent.getMaxLevel()))
{
showChatWindow(player, 2);
return;
}
List<KrateisCubePlayerObject> list = cubeEvent.getObjects(KrateisCubeEvent.REGISTERED_PLAYERS);
KrateisCubePlayerObject krateisCubePlayer = cubeEvent.getRegisteredPlayer(player);
if (krateisCubePlayer != null)
{
showChatWindow(player, 6);
return;
}
if (list.size() >= 25)
{
showChatWindow(player, 9);
}
else
{
cubeEvent.addObject(KrateisCubeEvent.REGISTERED_PLAYERS, new KrateisCubePlayerObject(player));
showChatWindow(player, 8);
}
}
else
{