Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
Fix suggest-player-names-when-null-tab-completions - Fixes #3803
Seems changes upstream broke original implementation moved check into method that actually does the injection
Dieser Commit ist enthalten in:
Ursprung
166e52b574
Commit
97f920bf19
@ -45,15 +45,16 @@ index 339463eb75e3cb4a9d025892835d54b6ce76c478..457007005f9ff5f6818c559635379a2e
|
|||||||
+ boolean suggestPlayerNamesWhenNullTabCompletions();
|
+ boolean suggestPlayerNamesWhenNullTabCompletions();
|
||||||
+ // Paper end
|
+ // 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 7f153000eee0f563ee4f1e3c218aadb5b6a33a97..1e126487de534ddd634d9a87b9c816d6d09fd467 100644
|
index 03bdc1622791e1206406c87065978688d602e39e..7c80dc54776d0d66f7816b77136f6dbd9b801704 100644
|
||||||
--- a/src/main/java/org/bukkit/command/PluginCommand.java
|
--- a/src/main/java/org/bukkit/command/Command.java
|
||||||
+++ b/src/main/java/org/bukkit/command/PluginCommand.java
|
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||||
@@ -151,6 +151,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo
|
@@ -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;
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren