diff --git a/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch index 302fc85168..d9a4bc0776 100644 --- a/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch @@ -45,15 +45,16 @@ index 339463eb75e3cb4a9d025892835d54b6ce76c478..457007005f9ff5f6818c559635379a2e + boolean suggestPlayerNamesWhenNullTabCompletions(); + // Paper end } -diff --git a/src/main/java/org/bukkit/command/PluginCommand.java b/src/main/java/org/bukkit/command/PluginCommand.java -index 7f153000eee0f563ee4f1e3c218aadb5b6a33a97..1e126487de534ddd634d9a87b9c816d6d09fd467 100644 ---- a/src/main/java/org/bukkit/command/PluginCommand.java -+++ b/src/main/java/org/bukkit/command/PluginCommand.java -@@ -151,6 +151,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo +diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java +index 03bdc1622791e1206406c87065978688d602e39e..7c80dc54776d0d66f7816b77136f6dbd9b801704 100644 +--- a/src/main/java/org/bukkit/command/Command.java ++++ b/src/main/java/org/bukkit/command/Command.java +@@ -99,7 +99,7 @@ public abstract class Command { + Validate.notNull(args, "Arguments cannot be null"); + Validate.notNull(alias, "Alias cannot be null"); + +- if (args.length == 0) { ++ if (args.length == 0 || !sender.getServer().suggestPlayerNamesWhenNullTabCompletions()) { // Paper - allow preventing player name suggestions by default) { + return ImmutableList.of(); } - if (completions == null) { -+ if (!sender.getServer().suggestPlayerNamesWhenNullTabCompletions()) return com.google.common.collect.ImmutableList.of(); // Paper - allow preventing player name suggestions by default - return super.tabComplete(sender, alias, args); - } - return completions;