Is your feature request related to a problem?
Currently, there are a few hard-coded things:
- The generated file names are always appended with
Brigadier
- The indent is always 4 spaces.
- Argument names are always 1:1 the same as parameter names.
This (mainly the third issue) can leave some frustrations to users who want more control over the AP.
Describe the solution you'd like.
The issue can be solved with the introduction of two new annotations:
@DefaultCommandsConfig
@CommandsConfig
The @DefaultCommandsConfig annotation allows setting global-defaults, which are applied to all commands.
Configurations can be overridden on a per-class basis using the @CommandsConfig annotation, which would be applied to the source file.
The default one would only be allowed to exist once per project to avoid any unexpected behaviour.
An example configuration might look like this:
@DefaultCommandsConfig(
indent = "\s\s", // two space indent
names = @PrependGeneratedFile("C"), // a source file named "MyCommand" generated a file "CMyCommand"
parameterMappings = ParameterMappings.KEBAB_CASE // "someParameter" turns into "some-parameter" in the Brigadier tree
)
public class MyJavaPlugin extends JavaPlugin {
// plugin logic
}
Describe alternatives you've considered.
No response
Other
No response
Is your feature request related to a problem?
Currently, there are a few hard-coded things:
BrigadierThis (mainly the third issue) can leave some frustrations to users who want more control over the AP.
Describe the solution you'd like.
The issue can be solved with the introduction of two new annotations:
@DefaultCommandsConfig@CommandsConfigThe
@DefaultCommandsConfigannotation allows setting global-defaults, which are applied to all commands.Configurations can be overridden on a per-class basis using the
@CommandsConfigannotation, which would be applied to the source file.The default one would only be allowed to exist once per project to avoid any unexpected behaviour.
An example configuration might look like this:
Describe alternatives you've considered.
No response
Other
No response