Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
- Fix DynaTech build
- Added 1.16+ compatibility to new DynaTech version
- PaperRequirementLevel system to loadAddon method
  • Loading branch information
ARVIN3108 committed Feb 25, 2024
1 parent c642de5 commit d615e82
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 96 deletions.
4 changes: 3 additions & 1 deletion Loader/src/id/universenetwork/sfa_loader/AddonsLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ else if (addonClass.isAnnotationPresent(AddonLibraries.class))
}
}

if (!PaperLib.isPaper()) if (!passPaperRequirements(addonClass, name)) return;

addon.onLoad();
loadedAddons.add(addon);

Expand All @@ -108,8 +110,8 @@ private void loadAddonWithHooks(Iterator<Class<? extends AddonTemplate>> addonIt
for (Iterator<String> iterator = hooks.iterator(); iterator.hasNext(); ) {
String hook = iterator.next();
if (AbstractAddon.config().getBoolean("addons." + hook.toLowerCase())) {
addonIterator.remove();
if (isAddonLoaded(hook)) continue;
addonIterator.remove();
addonsWithHooksClasses.add(addonClass);
return;
}
Expand Down
Loading

0 comments on commit d615e82

Please sign in to comment.