From 263b512e51751aad373afe1f295738886fe7df64 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 22 Mar 2012 08:02:38 -0400 Subject: [PATCH] Added configurable Connection Throttle. Addresses BUKKIT-1274 By: EvilSeph --- paper-api/src/main/java/org/bukkit/Bukkit.java | 4 ++++ paper-api/src/main/java/org/bukkit/Server.java | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index 601ebdc256..8654700774 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -310,6 +310,10 @@ public final class Bukkit { return server.getUpdateFolderFile(); } + public static long getConnectionThrottle() { + return server.getConnectionThrottle(); + } + public static int getTicksPerAnimalSpawns() { return server.getTicksPerAnimalSpawns(); } diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index 5f79700ee3..44f44af4a7 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -126,7 +126,7 @@ public interface Server extends PluginMessageRecipient { /** * Get generate-structures setting - * + * * @return true if structure generation is enabled, false if not */ public boolean getGenerateStructures(); @@ -199,6 +199,13 @@ public interface Server extends PluginMessageRecipient { */ public File getUpdateFolderFile(); + /** + * Gets the value of the connection throttle setting + * + * @return the value of the connection throttle setting + */ + public long getConnectionThrottle(); + /** * Gets default ticks per animal spawns value *