diff options
author | Erik Broes <erikbroes@grum.nl> | 2012-01-15 11:11:25 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2012-01-15 11:11:41 +0100 |
commit | d7cec38c385e83c155a47fa970e223361de3d9a9 (patch) | |
tree | f3b1ebc4b2bb9ead0bfca2d4670ae738778f7d8e /src | |
parent | 25050e38eb02c93b32fc9b1eaf2de82992a7ff3a (diff) | |
download | craftbukkit-d7cec38c385e83c155a47fa970e223361de3d9a9.tar craftbukkit-d7cec38c385e83c155a47fa970e223361de3d9a9.tar.gz craftbukkit-d7cec38c385e83c155a47fa970e223361de3d9a9.tar.lz craftbukkit-d7cec38c385e83c155a47fa970e223361de3d9a9.tar.xz craftbukkit-d7cec38c385e83c155a47fa970e223361de3d9a9.zip |
Adding the option to suppress overload warnings as a bukkit.yml option. Thanks oloflarsson for the PR.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/MinecraftServer.java | 1 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 4 | ||||
-rw-r--r-- | src/main/resources/configurations/bukkit.yml | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 94ab57fc..fc844a3a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -412,6 +412,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe long l = k - i; if (l > 2000L) { + if (this.server.getWarnOnOverload()) // CraftBukkit - Adding an option to suppress these warning messages log.warning("Can\'t keep up! Did the system time change, or is the server overloaded?"); l = 2000L; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index c7462d2a..d1c5fb2e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -321,6 +321,10 @@ public final class CraftServer implements Server { return this.getConfigBoolean("allow-nether", true); } + public boolean getWarnOnOverload() { + return this.configuration.getBoolean("settings.warn-on-overload"); + } + public boolean hasWhitelist() { return this.getConfigBoolean("white-list", false); } diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml index 3dc5707d..392ca9c0 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -15,6 +15,7 @@ settings: allow-end: true + warn-on-overload: true spawn-radius: 16 permissions-file: permissions.yml update-folder: update |