lucko / commodore

Utility for using Minecraft's 1.13 'brigadier' library in Bukkit plugins.
MIT License
176 stars 15 forks source link

Detach .commodore parser into it's own project/repo. #8

Closed i509VCB closed 4 years ago

i509VCB commented 4 years ago

This request is somewhat a Commodore and LuckPerms request at the same time, but since it's related to the .commodore parser it goes here.

So this is a request for my port of LuckPerms onto fabric (Here, it's almost ready to go except for brigadier completions).

I want to use the normal brigadier tree generated from the .commodore without the complexity of building my own tree for compatibility sakes with the rest of the code. However I cannot bundle commodore into the fabric jar for the obvious reason of bukkit interfaces and etc being present in the code.

One possible solution I suggest would be to detach the .commodore parser into a project both the main commodore project and my little LP spinoff [which I hope to PR in the near future] could use without risk of bundling libraries that shouldn't be there.

Of course I could lazily copy the parser code but that would do horribly for abstraction and likely cause rejection of PR.

Andre601 commented 4 years ago

I agree. Having a modular-like system would imo be a good approach as it allows us (the devs) to choose which option we want to use, while not downloading unnecessary code from the bukkit-platform. Maybe Commodore could go with a base-module that contains basic (platform-independent) code and the different modules for file and code-parsing.

The issue I see here tho is, that the file parses uses/requires PluginCommand which is a bukkit-class, making it (sadly) bound to bukkit, so it would require an independent option there.

But other than that +1 for this suggestion.

i509VCB commented 4 years ago

Just for clarification I only need the .commodore parser that returns CommandNodes and nothing else from this.

lucko commented 4 years ago

https://github.com/lucko/commodore-file