Open Lemar98 opened 2 years ago
I'm overhauling this library to support these sort of descriptions so hopefully in the very near future.
V2.0.0-SNAPSHOT supports this now. I'm close to merging this to master. The only requirement is that it'll do the tooltips if you have ProtocolLib installed otherwise will fallback to the non-tooltip method as I can't use brigadier directly since its too limiting for some features I want to support.
Edit: The annotations for the above are:
By default tooltips use the 'description' part of the Arg string, however you'll note the Portal Types (this is for another plugin of mine called PortalNetwork will override the description and instead give the actual portal names since it has its own parser it provides called @portaltype
.
The only thing I can't do is have Brigadier errors come up as you're typing since I can't create a Brigadier argument tree as its requires that its built when the player joins whereas BCF does it dynamically when the command is parsed. This is because the dynamic part of the system means I have no idea how many arguments there could be (it could change based upon the input) and is especially noticeable with switches that can move to any part of a command (IE, the -type
part of the command in the preview).
In the commandAPI plugin (https://github.com/JorelAli/CommandAPI) I saw an interesting feature: when the player moves his mouse over one of the tooltips in tabcomplete, he is shown some kind of message that is predefined in the class. Is it possible to do the same with your api? The documentation mentions the @Description annotation, but I still don’t understand what it is for, because it doesn’t output anything to the game