From 12fff3a0e92e82b6d9af8a5677edaf00bb3da4d2 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 22 Mar 2012 08:03:24 -0400 Subject: [PATCH] Added configurable Connection Throttle. Addresses BUKKIT-1274 By: EvilSeph --- .../src/main/java/org/bukkit/craftbukkit/CraftServer.java | 4 ++++ paper-server/src/main/resources/configurations/bukkit.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 617676a7b4..8e6bdd4131 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -424,6 +424,10 @@ public final class CraftServer implements Server { return this.configuration.getInt("settings.ping-packet-limit", 100); } + public long getConnectionThrottle() { + return this.configuration.getInt("settings.connection-throttle"); + } + public int getTicksPerAnimalSpawns() { return this.configuration.getInt("ticks-per.animal-spawns"); } diff --git a/paper-server/src/main/resources/configurations/bukkit.yml b/paper-server/src/main/resources/configurations/bukkit.yml index 9f89cbf711..a1ebd98a68 100644 --- a/paper-server/src/main/resources/configurations/bukkit.yml +++ b/paper-server/src/main/resources/configurations/bukkit.yml @@ -22,6 +22,7 @@ settings: ping-packet-limit: 100 use-exact-login-location: false plugin-profiling: false + connection-throttle: 4000 ticks-per: animal-spawns: 400 monster-spawns: 1