Paper/Spigot-Server-Patches/0178-Add-configuration-option-to-prevent-player-names-fro.patch
Andrew Steinborn 7141632abf Add Velocity IP forwarding support (#1557)
While Velocity supports BungeeCord-style IP forwarding, it is not secure. Users
have a lot of problems setting up firewalls or setting up plugins like IPWhitelist.
Further, the BungeeCord IP forwarding protocol still retains essentially its original
form, when there is brand new support for custom login plugin messages in 1.13.

Velocity's modern IP forwarding uses an HMAC-SHA256 code to ensure authenticity
of messages, is packed into a binary format that is smaller than BungeeCord's
forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
2018-10-18 20:44:59 -04:00

40 lines
1.6 KiB
Diff

From e05f5ac9c6cdbf5f654a3db6329ac6b516d5c67a Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:34 -0700
Subject: [PATCH] Add configuration option to prevent player names from being
suggested
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 6b92ea437..963096fb3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -289,4 +289,9 @@ public class PaperConfig {
}
removeInvalidStatistics = getBoolean("settings.remove-invalid-statistics", false);
}
+
+ public static boolean suggestPlayersWhenNullTabCompletions = true;
+ private static void suggestPlayersWhenNull() {
+ suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions);
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ec31ae0d9..cd925d0ac 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2051,5 +2051,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}
+
+ @Override
+ public boolean suggestPlayerNamesWhenNullTabCompletions() {
+ return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
+ }
// Paper end
}
--
2.19.1