2020-08-25 04:22:08 +02:00
|
|
|
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
|
2021-02-16 18:08:29 +01:00
|
|
|
index e340ef507d5a2b6b14114d0f061679c1a90884d4..9ec0608a79bc9cf3a992f9e549fd471e10e6bb5e 100644
|
2020-08-25 04:22:08 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
@@ -171,6 +171,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
|
2021-02-16 18:08:29 +01:00
|
|
|
index 73537af41d010283221418084c244261f262ceab..69070e472518fba66581e6050d3308d46c1d1608 100644
|
2020-08-25 04:22:08 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
|
|
@@ -144,6 +144,15 @@ public interface Server extends PluginMessageRecipient {
|
|
|
|
*/
|
|
|
|
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.
|
|
|
|
*
|