We're going on an Adventure! (#4842)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
parent
1a97356116
commit
4e958e229f
948 changed files with 7844 additions and 1589 deletions
|
@ -1,48 +0,0 @@
|
|||
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 e340ef507d5a2b6b14114d0f061679c1a90884d4..9ec0608a79bc9cf3a992f9e549fd471e10e6bb5e 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 73537af41d010283221418084c244261f262ceab..69070e472518fba66581e6050d3308d46c1d1608 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.
|
||||
*
|
Loading…
Add table
Add a link
Reference in a new issue