mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-12 02:36:18 +00:00
load platform addons
This commit is contained in:
@@ -118,6 +118,10 @@ public abstract class AbstractPlatform implements Platform {
|
||||
return eventManager;
|
||||
}
|
||||
|
||||
protected Optional<BaseAddon> platformAddon() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Profiler getProfiler() {
|
||||
return profiler;
|
||||
@@ -192,6 +196,11 @@ public abstract class AbstractPlatform implements Platform {
|
||||
|
||||
addonRegistry.register(internalAddon.getID(), internalAddon);
|
||||
|
||||
platformAddon().ifPresent(baseAddon -> {
|
||||
baseAddon.initialize();
|
||||
addonRegistry.register(baseAddon.getID(), baseAddon);
|
||||
});
|
||||
|
||||
BootstrapAddonLoader bootstrapAddonLoader = new BootstrapAddonLoader(this);
|
||||
|
||||
Path addonsFolder = getDataFolder().toPath().resolve("addons");
|
||||
|
||||
Reference in New Issue
Block a user