AtomicBlom / Brigadier.NET

a .NET Port of Mojang's command line parser
MIT License
44 stars 7 forks source link

Redirects don't work #5

Closed robmart closed 1 month ago

robmart commented 1 month ago
        var exitNode = dispatcher.Register(command => 
            command.Literal("exit")
                .Executes(_ => Execute())
        );
        dispatcher.Register(command => command.Literal("quit").Redirect(exitNode));

The above code will result in an exception when attempting to run the command quit, because quit is not a command. Seems like redirects are ignored entirely when executing.

robmart commented 1 month ago

This is apparently intended behavior? It is at least consistent with brigadier Mojang/brigadier#46