mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
385f313a8b
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d41796de SPIGOT-7071: Add Player#stopSound(SoundCategory category) 61dae5b2 SPIGOT-7011, SPIGOT-7065: Overhaul of structures CraftBukkit Changes: 991aeda12 SPIGOT-1729, SPIGOT-7090: Keep precision in teleportation between worlds 5c9a5f628 SPIGOT-7071: Add Player#stopSound(SoundCategory category) 68f888ded SPIGOT-7011, SPIGOT-7065: Overhaul of structures 0231a3746 Remove outdated build delay. Spigot Changes: 475f6008 Rebuild patches 8ce1761f Rebuild patches
38 lines
1.8 KiB
Diff
38 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
Date: Sat, 22 Aug 2020 23:59:30 +0200
|
|
Subject: [PATCH] Add #setMaxPlayers API
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index be7a25560cd5521ddfe4793c7e51b1036fc8a19c..869fa7c3913185c3537185426e75c076fbbdb7fe 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -146,7 +146,7 @@ public abstract class PlayerList {
|
|
public final PlayerDataStorage playerIo;
|
|
private boolean doWhiteList;
|
|
private final RegistryAccess.Frozen registryHolder;
|
|
- protected final int maxPlayers;
|
|
+ protected int maxPlayers; public final void setMaxPlayers(int maxPlayers) { this.maxPlayers = maxPlayers; } // Paper - remove final and add setter
|
|
private int viewDistance;
|
|
private int simulationDistance;
|
|
private boolean allowCheatsForAllPlayers;
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index ad2e460086a2f7f9e168c2f99d920862deacc844..efa7069504ef5aa4fc25320fdf8020222b17a48d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -672,6 +672,13 @@ public final class CraftServer implements Server {
|
|
return this.playerList.getMaxPlayers();
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public void setMaxPlayers(int maxPlayers) {
|
|
+ this.playerList.setMaxPlayers(maxPlayers);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
// NOTE: These are dependent on the corresponding call in MinecraftServer
|
|
// so if that changes this will need to as well
|
|
@Override
|