mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-09 09:01:36 +01:00
parent
5301642c90
commit
0c94630926
@ -27,7 +27,7 @@
|
||||
public abstract class PlayerList {
|
||||
|
||||
public static final File USERBANLIST_FILE = new File("banned-players.json");
|
||||
@@ -119,14 +139,16 @@
|
||||
@@ -119,32 +139,44 @@
|
||||
private static final int SEND_PLAYER_INFO_INTERVAL = 600;
|
||||
private static final SimpleDateFormat BAN_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
|
||||
private final MinecraftServer server;
|
||||
@ -47,7 +47,12 @@
|
||||
public final WorldNBTStorage playerIo;
|
||||
private boolean doWhiteList;
|
||||
private final LayeredRegistryAccess<RegistryLayer> registries;
|
||||
@@ -138,13 +160,23 @@
|
||||
private final IRegistryCustom.Dimension synchronizedRegistries;
|
||||
- protected final int maxPlayers;
|
||||
+ public int maxPlayers;
|
||||
private int viewDistance;
|
||||
private int simulationDistance;
|
||||
private boolean allowCheatsForAllPlayers;
|
||||
private static final boolean ALLOW_LOGOUTIVATOR = false;
|
||||
private int sendAllPlayerInfoIn;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user