Skip to content

Commit 914a284

Browse files
committed
Fix plugin registration trying to access the CreditsController in headless mode.
1 parent 8e881d2 commit 914a284

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
@@ -57,7 +57,6 @@
5757
import java.util.*;
5858
import java.util.concurrent.ForkJoinPool;
5959
import java.util.stream.Collectors;
60-
import java.util.stream.Stream;
6160

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

284285
try {
285286
plugin.attach(this);

0 commit comments

Comments
 (0)