}
private static void buildWho(EpicZonePlayer ezp, Player player, int pageNumber, boolean allZones)
{
EpicZone currentZone = General.getPlayer(player.getName()).getCurrentZone();
if(currentZone == null){allZones = true;}
ArrayList<EpicZonePlayer> players = getPlayers(currentZone, allZones);
int playersPerPage = 8;
int playerCount = players.size();
if (allZones)
{
player.sendMessage(playerCount + " Players Online [Page " + pageNumber + " of " + ((int)Math.ceil((double)playerCount / (double)playersPerPage) + 1) + "]");
for(int i = (pageNumber - 1) * playersPerPage; i < (pageNumber * playersPerPage); i++)
{
if (players.size() > i)
{
player.sendMessage(buildWhoPlayerName(ezp, players, i, allZones));
}
}
}
else
{
player.sendMessage(playerCount + " Players Online in " + currentZone.getName() + " [Page " + pageNumber + " of " + ((int)Math.ceil((double)playerCount / playersPerPage) + 1) + "]");
for(int i = (pageNumber - 1) * playersPerPage; i < pageNumber * playersPerPage; i++)
{
if (players.size() > i)
{
player.sendMessage(buildWhoPlayerName(ezp, players, i, allZones));