From 0095add08c4ca77f8e236a464eadeae4620f577a Mon Sep 17 00:00:00 2001 From: H31IX Date: Sat, 9 Jun 2012 13:59:52 -0400 Subject: [PATCH] Add query-plugins setting. Addresses BUKKIT-1781 --- src/main/java/net/minecraft/server/MinecraftServer.java | 2 +- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 4 ++++ src/main/resources/configurations/bukkit.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 687932f5fc..e6c7ec1344 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -728,7 +728,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe result.append(" on Bukkit "); result.append(server.getBukkitVersion()); - if (plugins.length > 0) { + if (plugins.length > 0 && this.server.getQueryPlugins()) { result.append(": "); for (int i = 0; i < plugins.length; i++) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index f695b83369..f73a1e502e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -399,6 +399,10 @@ public final class CraftServer implements Server { public boolean getWarnOnOverload() { return this.configuration.getBoolean("settings.warn-on-overload"); } + + public boolean getQueryPlugins() { + return this.configuration.getBoolean("settings.query-plugins"); + } 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 ebd6d02ae0..5d25011857 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -23,6 +23,7 @@ settings: use-exact-login-location: false plugin-profiling: false connection-throttle: 4000 + query-plugins: true spawn-limits: monsters: 70 animals: 15