📄 serverconfig.java
字号:
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the port for the GatewayServer.
*
* @return gatewayServerPort
*/
public int getGatewayServerPort() {
return gatewayServerPort;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the port for the GatewayServer. There is no restriction on this number.
*
* @param gatewayServerPort gateway Server Port to set
*/
public void setGatewayServerPort( int gatewayServerPort ) {
this.gatewayServerPort = gatewayServerPort;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the maximum number of game connections.
*
* @param maxNumberOfGameConnections to set
*/
public void setMaxNumberOfGameConnections( int maxNumberOfGameConnections ) {
this.maxNumberOfGameConnections = maxNumberOfGameConnections;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the maximum number of account connections.
*
* @param maxNumberOfAccountConnections to set
*/
public void setMaxNumberOfAccountConnections( int maxNumberOfAccountConnections ) {
this.maxNumberOfAccountConnections = maxNumberOfAccountConnections;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the maximum number of gateway connections.
*
* @param maxNumberOfGatewayConnections to set
*/
public void setMaxNumberOfGatewayConnections( int maxNumberOfGatewayConnections ) {
this.maxNumberOfGatewayConnections = maxNumberOfGatewayConnections;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the maximum number of account connections.
*
* @return maxNumberOfAccountConnections
*/
public int getMaxNumberOfAccountConnections() {
return maxNumberOfAccountConnections;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the maximum number of game connections.
*
* @return maxNumberOfGameConnections
*/
public int getMaxNumberOfGameConnections() {
return maxNumberOfGameConnections;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the maximum number of gateway connections.
*
* @return maxNumberOfGatewayConnections
*/
public int getMaxNumberOfGatewayConnections() {
return maxNumberOfGatewayConnections;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get a description of the content of this server : towns, guilds, etc ...
*
* @return description
*/
public String getDescription() {
return description;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set a description about the content of this server : towns, guilds, etc ...
*
* @param description server description
*/
public void setDescription( String description ) {
this.description = description;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the Server Physical Location. Is it in France, England, USA, Australia ?
*
* @return location
*/
public String getLocation() {
return location;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the Server Physical Location. Is it in France, England, USA, Australia ?
*
* @param location location to set
*/
public void setLocation( String location ) {
this.location = location;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the email of the Wotlas Server Administrator.
*
* @return adminEmail
*/
public String getAdminEmail() {
return adminEmail;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the email of the Wotlas Server Administrator.
*
* @param adminEmail wotlas server admin email
*/
public void setAdminEmail( String adminEmail ) {
this.adminEmail = adminEmail;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the version of this server config
*
* @return configVersion
*/
public String getConfigVersion() {
return configVersion.trim();
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the version of this server config.
*/
public void setConfigVersion() {
configVersion = "WOT-"+System.currentTimeMillis();
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To set the version of this SErverConfig.
*
* @param configVersion version.
*/
public void setConfigVersion( String configVersion ) {
this.configVersion = configVersion.trim();
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the player's first x position in the world.
* @return worldFirstXPosition
*/
public int getWorldFirstXPosition() {
return worldFirstXPosition;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the player's first x position in the world.
* @param worldFirstXPosition
*/
public void setWorldFirstXPosition( int worldFirstXPosition ) {
this.worldFirstXPosition = worldFirstXPosition;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the player's first y position in the world.
* @return worldFirstYPosition
*/
public int getWorldFirstYPosition() {
return worldFirstYPosition;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the player's first y position in the world.
* @param worldFirstYPosition
*/
public void setWorldFirstYPosition( int worldFirstYPosition ) {
this.worldFirstYPosition = worldFirstYPosition;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get this ServerConfig as a String.
*
* @return a string containing all the information to export.
*/
public String toString() {
return "Wotlas Server Declaration\n"
+"Ref:\n "+configVersion+"\n"
+"\nServer Symbolic Name:\n "+serverSymbolicName
+"\nServer Name:\n "+serverName
+"\nServer ID:\n "+serverID+"\n"
+"\nAccount Port:\n "+accountServerPort
+"\nGame Port:\n "+gameServerPort
+"\nGateway Port:\n "+gatewayServerPort+"\n"
+"\nLocation:\n "+location
+"\nAdmin e-mail:\n "+adminEmail
+"\nDescription:\n "+description+"\n";
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get this ServerConfig as a HTML String.
*
* @return a string containing all the information to export.
*/
public String toHTML() {
return "<h2>Wotlas Server</h2><br>"
+"<b>Server Symbolic Name :</b> "+serverSymbolicName+"<br>"
+"<b>Server address:</b> "+serverName+"<br>"
+"<b>Server ID:</b> "+serverID+"<br>"
+"<b>Location:</b> "+location+"<br>"
+"<b>Admin e-mail:</b> <i>"+adminEmail+"</i><br>"
+"<b>Description:</b> "+description+"<br>";
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To get the last time we updated this config.
*/
public long getLastUpdateTime() {
return lastUpdateTime;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/** To clear the last update timestamp. This operation will force the next call
* to this config (via the ServerConfigList) to first fetch a new config on the net.
*/
public void clearLastUpdateTime() {
lastUpdateTime=0;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -