Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
d8e07590e3
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: 5dbedae1 PR-864: Fix Registry#match() failing namespaced inputs 49256865 PR-863: Fix boolean PersistentDataType 9f15450b SPIGOT-7195, SPIGOT-7197: Add DataPack API ebef5b6a Disable InterfaceIsType Checkstyle check 01d577f5 Slight tweak to boolean PersistentDataType javadoc d2b99e56 PR-857: Add boolean PersistentDataType CraftBukkit Changes: 2270366cd PR-1196: Test Registry instances more thoroughly 863dacb7a PR-1191: Do not start on pre-release Java 17 1f2dd8e12 SPIGOT-7362: Properly handle null in CraftBlock#blockFaceToNotch() dbc70bed5 SPIGOT-7195, SPIGOT-7197: Add DataPack API
49 Zeilen
1.7 KiB
Diff
49 Zeilen
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
Date: Sat, 22 Aug 2020 23:59:25 +0200
|
|
Subject: [PATCH] Add #setMaxPlayers API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index ce409a88b1f7fc519b2d7795005752b4349e4176..bae2ef297ba585c916ea06c4316e9511696000da 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -209,6 +209,17 @@ public final class Bukkit {
|
|
return server.getMaxPlayers();
|
|
}
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Set the maximum amount of players which can login to this server.
|
|
+ *
|
|
+ * @param maxPlayers the amount of players this server allows
|
|
+ */
|
|
+ public static void setMaxPlayers(int maxPlayers) {
|
|
+ server.setMaxPlayers(maxPlayers);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Get the game port that the server runs on.
|
|
*
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index d080d535275b28400471265315e0d70bf806cbb8..31e8a002f9b0641f16bc4cf330e6022b13942321 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -161,6 +161,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
*/
|
|
public int getMaxPlayers();
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Set the maximum amount of players which can login to this server.
|
|
+ *
|
|
+ * @param maxPlayers the amount of players this server allows
|
|
+ */
|
|
+ public void setMaxPlayers(int maxPlayers);
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Get the game port that the server runs on.
|
|
*
|