mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-06 15:52:03 +00:00
修改库类加载器
This commit is contained in:
@@ -39,12 +39,21 @@ public class PaperCraftEngineBootstrap implements PluginBootstrap {
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new RuntimeException("Failed to getLogger", e);
|
||||
}
|
||||
this.plugin = new BukkitCraftEngine(
|
||||
logger,
|
||||
context.getDataDirectory(),
|
||||
new BukkitClassPathAppender(),
|
||||
new PaperPluginClassPathAppender(this.getClass().getClassLoader())
|
||||
);
|
||||
try {
|
||||
this.plugin = new BukkitCraftEngine(
|
||||
logger,
|
||||
context.getDataDirectory(),
|
||||
new BukkitClassPathAppender(),
|
||||
new PaperPluginClassPathAppender(this.getClass().getClassLoader())
|
||||
);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
this.plugin = new BukkitCraftEngine(
|
||||
logger,
|
||||
context.getDataDirectory(),
|
||||
new PaperPluginClassPathAppender(this.getClass().getClassLoader()),
|
||||
new PaperPluginClassPathAppender(this.getClass().getClassLoader())
|
||||
);
|
||||
}
|
||||
this.plugin.applyDependencies();
|
||||
this.plugin.setUpConfig();
|
||||
if (isDatapackDiscoveryAvailable()) {
|
||||
|
||||
Reference in New Issue
Block a user