aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAikar <[email protected]>2016-10-19 23:37:14 -0400
committerAikar <[email protected]>2016-10-19 23:37:14 -0400
commit3407aa32853936155ae041fbbea30f2ee1760fb8 (patch)
tree40b78813d17a15f594961898f3363697c41c4b70
parent2645ee04aebe8cd04a1db6c29d51f68cd3040cd4 (diff)
downloadPaper-3407aa32853936155ae041fbbea30f2ee1760fb8.tar.gz
Paper-3407aa32853936155ae041fbbea30f2ee1760fb8.zip
Option to hide plugins from the Query Protocol
-rw-r--r--Spigot-Server-Patches/0180-Option-to-hide-plugins-from-Query-Protocol.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0180-Option-to-hide-plugins-from-Query-Protocol.patch b/Spigot-Server-Patches/0180-Option-to-hide-plugins-from-Query-Protocol.patch
new file mode 100644
index 0000000000..8a5d4d82f6
--- /dev/null
+++ b/Spigot-Server-Patches/0180-Option-to-hide-plugins-from-Query-Protocol.patch
@@ -0,0 +1,36 @@
+From 8417c84433fe88b57d5a7e898a65c999ce1907c7 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Wed, 19 Oct 2016 23:36:48 -0400
+Subject: [PATCH] Option to hide plugins from Query Protocol
+
+
+diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
+index 3161dad..59763b0 100644
+--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
++++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
+@@ -241,4 +241,9 @@ public class PaperConfig {
+ flyingKickPlayerMessage = getString("messages.kick.flying-player", flyingKickPlayerMessage);
+ flyingKickVehicleMessage = getString("messages.kick.flying-vehicle", flyingKickVehicleMessage);
+ }
++
++ public static boolean hidePluginsFromQuery = false;
++ private static void hidePluginsFromQuery() {
++ hidePluginsFromQuery = getBoolean("settings.hide-plugins-from-query", false);
++ }
+ }
+diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
+index e70d5c5..229b771 100644
+--- a/src/main/java/net/minecraft/server/DedicatedServer.java
++++ b/src/main/java/net/minecraft/server/DedicatedServer.java
+@@ -657,7 +657,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
+ result.append(" on Bukkit ");
+ result.append(server.getBukkitVersion());
+
+- if (plugins.length > 0 && server.getQueryPlugins()) {
++ if (!com.destroystokyo.paper.PaperConfig.hidePluginsFromQuery && plugins.length > 0 && server.getQueryPlugins()) { // Paper
+ result.append(": ");
+
+ for (int i = 0; i < plugins.length; i++) {
+--
+2.10.1
+