Paper/Spigot-Server-Patches/0178-Add-configuration-option-to-prevent-player-names-fro.patch
Aikar 459987d69f
More improvements to activation range, improve turtles
improved the water code so that immunity wont trigger if the entity
has the water pathfinder system active, so this improves support
for all entities that know how to behave in water.

Merged 2 EAR patches together, and removed an MCUtil method that
doesnt have a purpose anymore
2018-10-04 23:18:46 -04:00

40 lines
1.6 KiB
Diff

From b9afe5d1eebf933d456cfb4f549b62895bacf5b8 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 78dbcb919d..e255d3d1e8 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -275,4 +275,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 73ab254aa0..849dd19dc0 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.0