Fix AbstractLinker

This commit is contained in:
2025-12-20 11:41:36 +01:00
parent 87cc43a348
commit 6cda79f7e1
3 changed files with 4 additions and 3 deletions
@@ -124,6 +124,7 @@ public class BauSystem extends JavaPlugin implements Listener {
} catch (AbstractLinker.LinkException e) { } catch (AbstractLinker.LinkException e) {
getLogger().log(Level.SEVERE, "Could not link a class.", e); getLogger().log(Level.SEVERE, "Could not link a class.", e);
Bukkit.shutdown(); Bukkit.shutdown();
return;
} }
TickListener.impl.init(); TickListener.impl.init();
@@ -45,8 +45,6 @@ public class TraceManager implements Listener {
instance = this; instance = this;
} }
public void init() { public void init() {
if (!tracesFolder.exists()) if (!tracesFolder.exists())
tracesFolder.mkdir(); tracesFolder.mkdir();
@@ -56,7 +56,9 @@ public abstract class AbstractLinker<T> {
.map(s -> { .map(s -> {
try { try {
return Class.forName(s, false, plugin.getClass().getClassLoader()); return Class.forName(s, false, plugin.getClass().getClassLoader());
} catch (ClassNotFoundException | NoClassDefFoundError e) { } catch (NoClassDefFoundError error) {
return null;
} catch (ClassNotFoundException e) {
throw new SecurityException(e.getMessage(), e); throw new SecurityException(e.getMessage(), e);
} }
}) })