aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0136-Add-configuration-option-to-prevent-player-names-fro.patch
blob: d896521b48bfcee722697b005e22cbda80317ace (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 0000000000000000000000000000000000000000 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 ac2c7977e2110feb7c45856d6f0a0ccdeedfcdb3..fa6beae844354849e73a45cf38eb1f0669c01e93 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -277,4 +277,9 @@ public class PaperConfig {
         flyingKickPlayerMessage = getString("messages.kick.flying-player", flyingKickPlayerMessage);
         flyingKickVehicleMessage = getString("messages.kick.flying-vehicle", flyingKickVehicleMessage);
     }
+
+    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 70cbf25466b7b7800c69d72c5f83b733cb83228b..50427b48a0f823cff8826ca205a9af16b2e2fe93 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2479,5 +2479,10 @@ public final class CraftServer implements Server {
         commandMap.registerServerAliases();
         return true;
     }
+
+    @Override
+    public boolean suggestPlayerNamesWhenNullTabCompletions() {
+        return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
+    }
     // Paper end
 }