geforkt von Mirrors/Paper
e6f8284125
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: d43a1e72 SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots 9d6e4847 SPIGOT-7122: New Allay Methods from 1.19.1 CraftBukkit Changes: c379a6b4e SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots 051fcced1 SPIGOT-7122: New Allay Methods from 1.19.1
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 f3f8a6db7ee1b4ea1aaf6bc972fa02a8af5f3772..2d26f1fd3bbbe95e7a73bb5ebc7d85c9e066c1ee 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -208,6 +208,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 4f17bc607639bb3d20a1694ffb02d22d283348b3..634a7e38987bc18232c07e5f767b37b523f13920 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -160,6 +160,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.
|
|
*
|