mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 09:19:38 +01:00
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
From 3df55783b95d0434f69f9fb85cc4db2cb5e993ac 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 644e011017..329950802f 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 35b26d6128..8412e71d71 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1989,5 +1989,10 @@ public final class CraftServer implements Server {
|
|
commandMap.registerServerAliases();
|
|
return true;
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
|
+ return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
|
+ }
|
|
// Paper end
|
|
}
|
|
--
|
|
2.18.0
|
|
|