Skip to content

Commit 1e821a7

Browse files
committed
Fix plugin registration trying to access the CreditsController in headless mode.
1 parent 960de2c commit 1e821a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

chunky/src/java/se/llbit/chunky/main/Chunky.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
import java.util.*;
5959
import java.util.concurrent.ForkJoinPool;
6060
import java.util.stream.Collectors;
61-
import java.util.stream.Stream;
6261

6362
/**
6463
* Chunky is a Minecraft mapping and rendering tool created byJesper Öqvist (jesper@llbit.se).
@@ -280,7 +279,9 @@ private void loadPlugins() {
280279
pluginManager.load(pluginManifests, (plugin, manifest) -> {
281280
String jarName = manifest.pluginJar.getName();
282281
Log.infof("Loading plugin: %s", jarName);
283-
CreditsController.addPlugin(manifest.name, manifest.version.toString(), manifest.author, manifest.description);
282+
if (!isHeadless()) {
283+
CreditsController.addPlugin(manifest.name, manifest.version.toString(), manifest.author, manifest.description);
284+
}
284285

285286
try {
286287
plugin.attach(this);

0 commit comments

Comments
 (0)