mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
20 lines
1,002 B
Diff
20 lines
1,002 B
Diff
|
--- a/com/mojang/brigadier/CommandDispatcher.java
|
||
|
+++ b/com/mojang/brigadier/CommandDispatcher.java
|
||
|
@@ -3,6 +3,7 @@
|
||
|
|
||
|
package com.mojang.brigadier;
|
||
|
|
||
|
+// CHECKSTYLE:OFF
|
||
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||
|
import com.mojang.brigadier.context.CommandContext;
|
||
|
import com.mojang.brigadier.context.CommandContextBuilder;
|
||
|
@@ -538,7 +539,7 @@
|
||
|
for (final CommandNode<S> node : parent.getChildren()) {
|
||
|
CompletableFuture<Suggestions> future = Suggestions.empty();
|
||
|
try {
|
||
|
- future = node.listSuggestions(context.build(truncatedInput), new SuggestionsBuilder(truncatedInput, truncatedInputLowerCase, start));
|
||
|
+ if (node.canUse(parse.getContext().getSource())) future = node.listSuggestions(context.build(truncatedInput), new SuggestionsBuilder(truncatedInput, truncatedInputLowerCase, start)); // CraftBukkit
|
||
|
} catch (final CommandSyntaxException ignored) {
|
||
|
}
|
||
|
futures[i++] = future;
|