geforkt von Mirrors/Paper
Remove redundant fillUsableCommands call (#11425)
Dieser Commit ist enthalten in:
Ursprung
ddd068d513
Commit
c40eeeefec
@ -2146,14 +2146,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
for (int i = 0; i < Math.min(astacktraceelement.length, 3); ++i) {
|
||||
@@ -0,0 +0,0 @@ public class Commands {
|
||||
private void sendAsync(ServerPlayer player) {
|
||||
// Paper end - Perf: Async command map building
|
||||
Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
|
||||
RootCommandNode vanillaRoot = new RootCommandNode();
|
||||
|
||||
- RootCommandNode vanillaRoot = new RootCommandNode();
|
||||
-
|
||||
- RootCommandNode<CommandSourceStack> vanilla = player.server.vanillaCommandDispatcher.getDispatcher().getRoot();
|
||||
+ RootCommandNode<CommandSourceStack> vanilla = player.server.getCommands().getDispatcher().getRoot(); // Paper
|
||||
map.put(vanilla, vanillaRoot);
|
||||
this.fillUsableCommands(vanilla, vanillaRoot, player.createCommandSourceStack(), (Map) map);
|
||||
- map.put(vanilla, vanillaRoot);
|
||||
- this.fillUsableCommands(vanilla, vanillaRoot, player.createCommandSourceStack(), (Map) map);
|
||||
-
|
||||
- // Now build the global commands in a second pass
|
||||
+ // Paper - brigadier API removes the need to fill the map twice
|
||||
RootCommandNode<SharedSuggestionProvider> rootcommandnode = new RootCommandNode();
|
||||
|
||||
map.put(this.dispatcher.getRoot(), rootcommandnode);
|
||||
@@ -0,0 +0,0 @@ public class Commands {
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren