NyaaCat / NyaaCore

Code infrastructure for all NyaaCat plugins
MIT License
22 stars 12 forks source link

Expose subCommands to subclass and add @SubCommand.attribute() #19

Closed Librazy closed 7 years ago

Librazy commented 7 years ago

and publish maven to maven-repo-dev

RecursiveG commented 7 years ago

How attributes can be used and what they can be used for?

Librazy commented 7 years ago

For CommandReceivers who override onCommand or onTabComplete. They can store data inside SubCommand annotation and use them to provide command prasing or tab completion.

RecursiveG commented 7 years ago

Then this field seems like plugin-specific data. And there's no specification for the string format. Thus naming it as attribute can be misleading. I suggest rename it to data or something.

RecursiveG commented 7 years ago

Also, if you have ideas about how TabCompletion can be implemented, you can try working on #7