|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetbattle.BattleServer
public class BattleServer
Nested Class Summary | |
---|---|
static class |
BattleServer.BattleServerException
|
static class |
BattleServer.ChatQueueItem
Entry in the chat log queue. |
Field Summary | |
---|---|
static int |
SERVER_VERSION
Version of the server. |
Constructor Summary | |
---|---|
BattleServer(java.lang.String name,
java.lang.String description,
java.lang.String unique,
int port,
int capacity,
java.lang.Class mechanics)
Creates a new instance of BattleServer |
Method Summary | |
---|---|
void |
banClient(NetClient mod,
java.lang.String name,
long date)
|
void |
banClient(NetClient mod,
java.lang.String name,
long date,
java.lang.String message)
Ban a client by name. |
void |
broadcast(NetMessage msg)
Broadcast a message to all clients. |
NetClient |
getClientByName(java.lang.String name)
Get a client by his user name. |
int |
getClientCount()
Return the number of clients. |
java.lang.String[] |
getClientNames(int[] level,
int[] status)
Get a list of user names. |
java.lang.Class |
getMechanicsClass()
Get the default mechanics for battles on the server. |
int |
getPort()
Get the port this server is running on. |
java.lang.String |
getServerName()
|
UserTableMessage |
getUserInformation()
Get a list of users and their information on this server. |
java.lang.String |
getWelcomeText()
Get the text of the welcome message from disc. |
boolean |
isLoggedOn(java.lang.String name)
Determine whether a user is logged on. |
void |
kickClient(NetClient mod,
java.lang.String name)
Kick a client by name. |
void |
removeClient(NetClient client)
Remove a client. |
void |
removeFromMetaserver()
Remove server from the metaserver. |
void |
run()
Run the server. |
void |
sendChatMessage(java.lang.String message)
Send a chat message to all clients. |
void |
sendChatMessage(java.lang.String message,
boolean important)
|
void |
setUserLevel(java.lang.String user,
int level)
Set the level of a user. |
void |
setWelcomeText(java.lang.String text)
Set the text of the welcome message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SERVER_VERSION
Constructor Detail |
---|
public BattleServer(java.lang.String name, java.lang.String description, java.lang.String unique, int port, int capacity, java.lang.Class mechanics)
Method Detail |
---|
public java.lang.Class getMechanicsClass()
public java.lang.String getServerName()
public void removeFromMetaserver()
public void run()
run
in interface java.lang.Runnable
public void setWelcomeText(java.lang.String text) throws BattleServer.BattleServerException
BattleServer.BattleServerException
public java.lang.String getWelcomeText() throws BattleServer.BattleServerException
BattleServer.BattleServerException
public int getPort()
public int getClientCount()
public java.lang.String[] getClientNames(int[] level, int[] status)
public void kickClient(NetClient mod, java.lang.String name)
public void banClient(NetClient mod, java.lang.String name, long date)
public void sendChatMessage(java.lang.String message)
public void sendChatMessage(java.lang.String message, boolean important)
public void banClient(NetClient mod, java.lang.String name, long date, java.lang.String message)
public NetClient getClientByName(java.lang.String name)
public boolean isLoggedOn(java.lang.String name)
public void removeClient(NetClient client)
public void setUserLevel(java.lang.String user, int level)
public UserTableMessage getUserInformation()
public void broadcast(NetMessage msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |