mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
74f507f4e3
Upstream has released updates that appears 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: e461dcfe #555: Item - add getters/setters for owner/thrower CraftBukkit Changes: 055870c4 #758: Item - add getters/setters for owner/thrower
48 lines
1.6 KiB
Diff
48 lines
1.6 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 62cc1c74c11f56dcbd1e24e9c5478497742e6351..bfe842364ee0a4bf39dacdbb6972477d57a4ef8a 100644
|
|
--- 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
|
|
index 6e01bf2d52e8bb6de7395f50c12f16c64aef72ae..7c0a788900c93c29d14d8c45ac5ae3317cf4a94e 100644
|
|
--- 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.
|
|
*
|