diff --git a/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch index ce2d8d8864..a05dc3eeea 100644 --- a/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch @@ -45,15 +45,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + boolean suggestPlayerNamesWhenNullTabCompletions(); + // Paper end } -diff --git a/src/main/java/org/bukkit/command/PluginCommand.java b/src/main/java/org/bukkit/command/PluginCommand.java +diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/command/PluginCommand.java -+++ b/src/main/java/org/bukkit/command/PluginCommand.java -@@ -0,0 +0,0 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo +--- a/src/main/java/org/bukkit/command/Command.java ++++ b/src/main/java/org/bukkit/command/Command.java +@@ -0,0 +0,0 @@ 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;