Add null check to makeClassLoader

This commit is contained in:
LeoDog896 2021-03-26 19:32:18 -04:00
parent 66ab1bb53d
commit 78734b5a3c

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) {
// orphaned extension, we can insert it directly
root.addChild(loader);
} else {