Merge pull request #188 from Project-Cepi/extension-classloader-fix

Add null check to makeClassLoader
This commit is contained in:
TheMode 2021-03-27 01:30:52 +01:00 committed by GitHub
commit 4ec6da5adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ public final class DiscoveredExtension {
MinestomExtensionClassLoader loader = new MinestomExtensionClassLoader(this.getName(), this.getEntrypoint(), urls, root);
if (this.getDependencies().length == 0) {
if (this.getDependencies().length == 0 || MinecraftServer.getExtensionManager() == null) { // it also may invoked in early class loader
// orphaned extension, we can insert it directly
root.addChild(loader);
} else {