mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 21:52:05 -07:00
update brig in the API and patch cleanup
This commit is contained in:
@@ -183,7 +183,6 @@
|
||||
+ private void sendAsync(ServerPlayer player, java.util.Collection<CommandNode<CommandSourceStack>> dispatcherRootChildren) {
|
||||
+ // Paper end - Perf: Async command map building
|
||||
+ Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
|
||||
+ // Paper - brigadier API removes the need to fill the map twice
|
||||
RootCommandNode<SharedSuggestionProvider> rootCommandNode = new RootCommandNode<>();
|
||||
map.put(this.dispatcher.getRoot(), rootCommandNode);
|
||||
- this.fillUsableCommands(this.dispatcher.getRoot(), rootCommandNode, player.createCommandSourceStack(), map);
|
||||
@@ -276,6 +275,7 @@
|
||||
- argumentBuilder.executes(commandContext -> 0);
|
||||
+ // Paper start - fix suggestions due to falsely equal nodes
|
||||
+ // Always create a new instance
|
||||
+ //noinspection Convert2Lambda
|
||||
+ argumentBuilder.executes(new com.mojang.brigadier.Command<>() {
|
||||
+ @Override
|
||||
+ public int run(com.mojang.brigadier.context.CommandContext<SharedSuggestionProvider> commandContext) {
|
||||
|
Reference in New Issue
Block a user