-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename NetworkServer to NetworkInterface and add docs for it
- Loading branch information
Showing
14 changed files
with
115 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
api/src/main/java/org/allaymc/api/network/NetworkInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package org.allaymc.api.network; | ||
|
||
/** | ||
* NetworkInterface is used to open an interface on the network that the client can connect to. | ||
* It also holds the information that will be shown to the client in the server list. | ||
* <p> | ||
* Please note that the changes in network interface won't be saved to server settings. | ||
* For example if you set the motd on network interface, it will only put into effect before stop the server. | ||
* That make it suitable for making dynamic motd and dynamic max player count. | ||
* | ||
* @author daoge_cmd | ||
*/ | ||
public interface NetworkInterface { | ||
/** | ||
* Set the current motd of the server. | ||
* | ||
* @param motd the new motd. | ||
*/ | ||
void setMotd(String motd); | ||
|
||
/** | ||
* Get the current motd of the server. | ||
* | ||
* @return the current motd. | ||
*/ | ||
String getMotd(); | ||
|
||
/** | ||
* Set the current sub-motd of the server. | ||
* | ||
* @param subMotd the new sub-motd. | ||
*/ | ||
void setSubMotd(String subMotd); | ||
|
||
/** | ||
* Get the current sub-motd of the server. | ||
* | ||
* @return the current sub-motd. | ||
*/ | ||
String getSubMotd(); | ||
|
||
/** | ||
* Set the current max player count of the server. | ||
* | ||
* @param maxPlayerCount the new max player count. | ||
*/ | ||
void setMaxPlayerCount(int maxPlayerCount); | ||
|
||
/** | ||
* Get the current max player count of the server. | ||
* | ||
* @return the current max player count. | ||
*/ | ||
int getMaxPlayerCount(); | ||
} |
47 changes: 0 additions & 47 deletions
47
api/src/main/java/org/allaymc/api/network/NetworkServer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.