Revert "Option to hide plugins from the Query Protocol"

This already exists

This reverts commit 3407aa3285.
This commit is contained in:
Aikar 2016-10-19 23:38:18 -04:00
parent 3407aa3285
commit 64e537e63c

View file

@ -1,36 +0,0 @@
From 8417c84433fe88b57d5a7e898a65c999ce1907c7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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