#852: Add setMotd and setMaxPlayers

By: Hannah <salvadin2@gmail.com>
This commit is contained in:
Bukkit/Spigot 2023-06-11 10:51:07 +10:00
parent 4e0abeaedb
commit 3d755c36f5
2 changed files with 32 additions and 0 deletions

View file

@ -164,6 +164,15 @@ public final class Bukkit {
return server.getMaxPlayers();
}
/**
* Set the maximum amount of players allowed to be logged in at once.
*
* @param maxPlayers The maximum amount of concurrent players
*/
public static void setMaxPlayers(int maxPlayers) {
server.setMaxPlayers(maxPlayers);
}
/**
* Get the game port that the server runs on.
*
@ -1534,6 +1543,15 @@ public final class Bukkit {
return server.getMotd();
}
/**
* Set the message that is displayed on the server list.
*
* @param motd The message to be displayed
*/
public static void setMotd(@NotNull String motd) {
server.setMotd(motd);
}
/**
* Gets the default message that is displayed when the server is stopped.
*

View file

@ -139,6 +139,13 @@ public interface Server extends PluginMessageRecipient {
*/
public int getMaxPlayers();
/**
* Set the maximum amount of players allowed to be logged in at once.
*
* @param maxPlayers The maximum amount of concurrent players
*/
void setMaxPlayers(int maxPlayers);
/**
* Get the game port that the server runs on.
*
@ -1301,6 +1308,13 @@ public interface Server extends PluginMessageRecipient {
@NotNull
String getMotd();
/**
* Set the message that is displayed on the server list.
*
* @param motd The message to be displayed
*/
void setMotd(@NotNull String motd);
/**
* Gets the default message that is displayed when the server is stopped.
*