Open mworzala opened 3 years ago
This can be done by checking the classpath for extension.json
(since the extension classpath will be added) or assuming its a server otherwise. In Minestom/Minestom#529 we will be able to load that directly using the "autoscan" mechanic.
We have the source project resources so we can load the file named
extension.json
and locate the extension main. The trickier part here is making the ExtensionManager load it (perhaps will require a mixin).The alternative is to use the system arguments:
minestom.extension.indevfolder.classes
minestom.extension.indevfolder.resources
These require us to specify the location of those, which are build config dependent (however we may be able to get them from gradle, in which case this is probably acceptable)