Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument#thenRecursive #529

Open
GliczDev opened this issue Mar 12, 2024 · 0 comments
Open

Argument#thenRecursive #529

GliczDev opened this issue Mar 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@GliczDev
Copy link

Description

Well, when using CommandTrees, arguments can sometimes look like that:

.then(new LiteralArgument("arg1")
    .then(new StringArgument("arg2")
        .then(new StringArgument("arg3")
            .then(new DoubleArgument("arg4", 0)
                .then(new StringArgument("arg5"))))))

and it looks... bad. (well, it can be a BIG tree)

Expected code

I suggest that there should be a method called thenRecursive in Argument class. It would work just like the code above, however, it would look more like:

.thenRecusvie(
    new LiteralArgument("arg1"),
    new StringArgument("arg2"),
    new StringArgument("arg3"),
    new DoubleArgument("arg4", 0),
    new StringArgument("arg5")
)

and it looks much more clean!

Extra details

No response

@GliczDev GliczDev added the enhancement New feature or request label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant