Closed huanmeng-qwq closed 3 months ago
Hi @huanmeng-qwq, thanks for your feedback.
Introducing @Quoted
feature would be a highly beneficial solution, and I suppose it will be introduced soon. Currently @Shortcut
don't support spaces in the name, but it is also a feature that we need to add.
The @Flag
annotation does not support other types such as String or Integer, for this moment we are using @Arg Optional<String>
to create optional arguments. https://github.com/Rollczi/LiteCommands/issues/219
I have seen the branches related to quoted strings, and I would like to propose a new suggestion based on #314 , which is to support input of '
. When players want to input"
, they can use '"'
to surround it, and vice versa
e.g: /quoted "huanmeng-qwq's Pet"
or /quoted 'my name "huanmeng-qwq"'
I know to add optional parameters to @Arg Optional<String>
, but it's different from @Flag
. @Flag
can specify the value of a certain parameter, while @Arg
needs to input in the order of the code
Of course, I also hope to be able to develop complete Flag features as quickly as possible
I have seen the branches related to quoted strings, and I would like to propose a new suggestion based on #314 , which is to support input of
'
. When players want to input"
, they can use'"'
to surround it, and vice versa e.g:/quoted "huanmeng-qwq's Pet"
or/quoted 'my name "huanmeng-qwq"'
Now a solution to this problem is \"
Yes, I have also considered using escape, which is a great implementation!
@Quoted
@Flag
@Shortcut
spaces in the name
PR:
Issues:
[ ] #219
I am migrating the framework for command content on a large server project to this project, but I found that it lacks support for Quoted and Flag, and I am not sure if the shortcut annotation supports quick registration of commands with spaces. Here is my examples
/prefix set "§cA §bPrefix"
/tag prefix set "§eB §bPrefix" --updateNow
At the same time, I also hope that Flag annotations are not limited to Boolean, but directly support parsing registered arguments. The following are relevant examples