This PR does a couple of things, that in reality, probably should have been split up into 2 PRs.
Split the project into multi modules: plugin, api, addons
Implement an addon system to allow for backwards compatibility with Java 8.
Addon System:
Allows developers to create simple clean code for item obtaining in EMF. For example: "itemsadder:id" or "oraxen:id".
This was done since some plugins require different Java version to run, so the plugin would fail to compile if we are running against Java 8.
Addons target Java 8 by default, this should be overwritten if needed. For example: oraxen requires java 17.
A note about compiling: We must package the addon files internally as ".addon", we then rename them later - this is done when the plugin loads. For other developers this is not needed and can be ignored.
Loading
On the first load the addon will check if the required plugins are present, this reduces some repeated code in EvenMoreFish.java
Addons will also check if their required java version is present, if you're trying to load the oraxen addon in Java 8 it will fail gracefully and log an error.
Config Changes:
Added use-additional-addons config option. Set to true by default. This extracts the default addons from the jar into the addons folder.
Default Addons
Template: even-more-fish-addons-j<version>, for example even-more-fish-addons-j17 in a module.
For addons that target Java 8, we should use the even-more-fish-plugin module, with the com.oheers.evenmorefish.addons.impl package.
Commands
Admin command to view currently installed addons. And if they are loading or not.
/emf admin addons
Removes the need for settings .headdb and .head-64 config settings, simply use headdb:id and head64:id . Settings have been left in for now to allow for backwards compatibility.
This PR does a couple of things, that in reality, probably should have been split up into 2 PRs.
Addon System:
Allows developers to create simple clean code for item obtaining in EMF. For example: "itemsadder:id" or "oraxen:id". This was done since some plugins require different Java version to run, so the plugin would fail to compile if we are running against Java 8.
Addons target Java 8 by default, this should be overwritten if needed. For example: oraxen requires java 17.
A note about compiling: We must package the addon files internally as ".addon", we then rename them later - this is done when the plugin loads. For other developers this is not needed and can be ignored.
Loading
On the first load the addon will check if the required plugins are present, this reduces some repeated code in EvenMoreFish.java Addons will also check if their required java version is present, if you're trying to load the oraxen addon in Java 8 it will fail gracefully and log an error.
Config Changes:
Added
use-additional-addons
config option. Set totrue
by default. This extracts the default addons from the jar into the addons folder.Default Addons
Template:
even-more-fish-addons-j<version>
, for exampleeven-more-fish-addons-j17
in a module.For addons that target Java 8, we should use the
even-more-fish-plugin
module, with thecom.oheers.evenmorefish.addons.impl
package.Commands
Admin command to view currently installed addons. And if they are loading or not.
/emf admin addons
Addons added:
.headdb
and.head-64
config settings, simply useheaddb:id
andhead64:id
. Settings have been left in for now to allow for backwards compatibility.