public class Server extends Object
| Modifier and Type | Field and Description | 
|---|---|
String | 
altName  | 
String | 
game  | 
int | 
id  | 
String | 
IP  | 
int | 
PORT  | 
String | 
script  | 
ServerStatus | 
status
Holds the server status. 
 | 
| Constructor and Description | 
|---|
Server()  | 
Server(String file)
Creates server Object and loads from file. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
add(Server sv)
Adds a Server to the svArray list. 
 | 
void | 
delete()
Removes the Server from the list and the harddisk. 
 | 
static Server | 
get(int index)
Returns a server from the list at the specified index. 
 | 
static ArrayList<Server> | 
getServerArray()
Returns the server array that contains all Server objects. 
 | 
static int | 
getServerCount()
Returns the amount of servers in the list (equals svArray.size()). 
 | 
static int | 
getSvIndexByID(int id)
Searches for the Server index in the list and returns it. 
 | 
static ArrayList<String> | 
loadFavs()
Loads all Servers. 
 | 
void | 
reload(boolean updateList)
Reloads the Server information if id ! 
 | 
void | 
save()
Saves the server information in a file. 
 | 
public String altName
public String IP
public String script
public String game
public int PORT
public int id
public ServerStatus status
public Server()
public Server(String file)
file - The path to the .server file.public void save()
public static void add(Server sv)
sv - The Server-object.public void reload(boolean updateList)
updateList - If true and the server is not in the list it will be added.public void delete()
public static Server get(int index)
index - The index the server has in the server list.public static int getServerCount()
public static ArrayList<Server> getServerArray()
public static int getSvIndexByID(int id)
id - Server ID