mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
#675: Fix redirected CommandNodes sometimes not being properly redirected
By: Matthias Ngeo <matthiasngeo@gmail.com>
This commit is contained in:
parent
5a47beb9cd
commit
36e3ae4ae6
1 changed files with 12 additions and 2 deletions
|
@ -140,9 +140,19 @@
|
||||||
|
|
||||||
argumentbuilder.requires((icompletionprovider) -> {
|
argumentbuilder.requires((icompletionprovider) -> {
|
||||||
return true;
|
return true;
|
||||||
@@ -222,7 +301,7 @@
|
@@ -218,11 +297,15 @@
|
||||||
argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (argumentbuilder.getRedirect() != null) {
|
||||||
|
- argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
|
||||||
|
+ // Craftbukkit start - fix redirected CommandNodes not being properly redirected if it is mapped after commandNode2
|
||||||
|
+ CommandNode<CommandListenerWrapper> destination = commandnode2.getRedirect();
|
||||||
|
+ if (destination != null) {
|
||||||
|
+ this.a(destination, (CommandNode) destination.createBuilder().build(), commandlistenerwrapper, map);
|
||||||
|
+ argumentbuilder.redirect((CommandNode) map.get(destination));
|
||||||
|
}
|
||||||
|
+ // Craftbukkit end
|
||||||
|
|
||||||
- CommandNode<ICompletionProvider> commandnode3 = argumentbuilder.build();
|
- CommandNode<ICompletionProvider> commandnode3 = argumentbuilder.build();
|
||||||
+ CommandNode commandnode3 = argumentbuilder.build(); // CraftBukkit - decompile error
|
+ CommandNode commandnode3 = argumentbuilder.build(); // CraftBukkit - decompile error
|
||||||
|
|
Loading…
Reference in a new issue