public class PlayerList extends Object
| Constructor and Description |
|---|
PlayerList() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name,
boolean bot)
Adds the player information to the lists and escapes the < and > html characters.
|
ArrayList<String> |
getCleanList(Colorset colors)
Returns a list containing the player names without color codes.
|
ArrayList<String> |
getHtmlList(Colorset colors)
Returns a list containing the player names in html format.
|
String |
getName(int index)
Returns the name of the player at the specified index.
|
ArrayList<String> |
getNames()
Copies the player names with unescaped html characters in a new list and returns it.
|
int |
getNumBotPlayer(boolean bot)
Returns the number of bots/players in the list.
|
int |
getNumEntries()
Returns the number of entries.
|
boolean |
isBot(int index)
Indicates if the player at the specified index is a bot.
|
public void add(String name, boolean bot)
name - The players name.bot - Indicates if the player is a bot.public String getName(int index)
public ArrayList<String> getNames()
public ArrayList<String> getCleanList(Colorset colors)
public ArrayList<String> getHtmlList(Colorset colors)
public boolean isBot(int index)
index - public int getNumBotPlayer(boolean bot)
bot - Indicates if you want to check for bots or players.public int getNumEntries()