#1184: Add setMotd and setMaxPlayers

By: Hannah <salvadin2@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2023-06-11 10:51:11 +10:00
parent 5301642c90
commit 0c94630926
2 changed files with 19 additions and 2 deletions

View File

@@ -631,6 +631,13 @@ public final class CraftServer implements Server {
return playerList.getMaxPlayers();
}
@Override
public void setMaxPlayers(int maxPlayers) {
Preconditions.checkArgument(maxPlayers >= 0, "maxPlayers must be >= 0");
playerList.maxPlayers = maxPlayers;
}
// NOTE: These are dependent on the corresponding call in MinecraftServer
// so if that changes this will need to as well
@Override
@@ -1954,6 +1961,11 @@ public final class CraftServer implements Server {
return console.getMotd();
}
@Override
public void setMotd(String motd) {
console.setMotd(motd);
}
@Override
public WarningState getWarningState() {
return warningState;