Skip to content

Conversation

@metabrixkt
Copy link

Fixes #5

As #5 description states, literal node aliases work on command execution, but suggestions don't. As of v2, this is no longer the case (at least on Paper with the modern brig api). Neither suggestions nor running the command work with aliases. So...

  • I tested it and it works
  • Other possibly related code unaffected (like root node aliases), also tested
  • Both suggestions and execution now work properly

🥔

@broccolai
Copy link
Member

Brigadier doesn't support aliases, adding the command for each alias inflates the command tree (that's sent to the player) significantly

@jpenilla
Copy link
Member

jpenilla commented Aug 2, 2024

This is an intentional decision not to create exponentially massive command trees. Brigadier does not have any way to represent aliases and redirects are broken and inconsistent in many ways. If we were to accept something like this it would need to be a per-command-chain option, not entirely sure of the best way to implement that, however.

@jpenilla jpenilla changed the title fix(cloud-brigadier): Fix literal node aliases with Brigadier feat(cloud-brigadier): Duplicate literal nodes for each alias with Brigadier Aug 2, 2024
@jpenilla jpenilla changed the title feat(cloud-brigadier): Duplicate literal nodes for each alias with Brigadier feat(brigadier): Duplicate literal nodes for each alias with Brigadier Aug 2, 2024
@metabrixkt
Copy link
Author

If we were to accept something like this it would need to be a per-command-chain option, not entirely sure of the best way to implement that, however.

@jpenilla What about adding something like BrigadierSetting.LITERAL_NODE_ALIASES for this? With a note in the javadoc that it results in a massive command tree

@jpenilla
Copy link
Member

jpenilla commented Aug 2, 2024

BrigadierSettings is not a per-command-chain configuration.

@metabrixkt
Copy link
Author

metabrixkt commented Aug 2, 2024

BrigadierSettings is not a per-command-chain configuration.

Well, either way:

  • If a command doesn't have literal nodes with aliases, it doesn't need this configuration
  • If a command has literal nodes with aliases, it needs this configuration because literal aliases don't work in suggestions or during execution, otherwise there's no point in adding aliases, they don't work without it anyway

So what's the point of per-command-chain configuration?

@metabrixkt
Copy link
Author

Any updates on this?

@Com6235
Copy link

Com6235 commented Jun 7, 2025

if the goal is not to make huge command trees then brigadier's redirects should work, I haven't had any errors with them.
+1 in any case, would be a great setting

@Axionize
Copy link

Axionize commented Dec 19, 2025

This is an intentional decision not to create exponentially massive command trees. Brigadier does not have any way to represent aliases and redirects are broken and inconsistent in many ways. If we were to accept something like this it would need to be a per-command-chain option, not entirely sure of the best way to implement that, however.

What's wrong with redirects? If /execute can work surely an alias can? What are the issues currently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command literal aliases do not work with Brigadier

5 participants