diff options
author | Luck <git@lucko.me> | 2022-04-24 17:25:47 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-04-24 17:25:47 +0100 |
commit | b077100667c1dee6e73da399e3484f92bbf67cb8 (patch) | |
tree | efac3cb29cb4cdbb93ba7ab2ba2aac9b050731f2 /spark-forge/src/main/java/me | |
parent | da5a859adb7d25752dd0d3564fa15669242ae92f (diff) | |
download | spark-b077100667c1dee6e73da399e3484f92bbf67cb8.tar.gz spark-b077100667c1dee6e73da399e3484f92bbf67cb8.tar.bz2 spark-b077100667c1dee6e73da399e3484f92bbf67cb8.zip |
Fix NPE caused by initialisation order on Forge/Fabric
Diffstat (limited to 'spark-forge/src/main/java/me')
-rw-r--r-- | spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java index 7805935..022b620 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java @@ -74,17 +74,18 @@ public abstract class ForgeSparkPlugin implements SparkPlugin { private final ForgeSparkMod mod; private final Logger logger; protected final ScheduledExecutorService scheduler; - protected final SparkPlatform platform; + + protected SparkPlatform platform; protected final ThreadDumper.GameThread threadDumper = new ThreadDumper.GameThread(); protected ForgeSparkPlugin(ForgeSparkMod mod) { this.mod = mod; this.logger = LogManager.getLogger("spark"); this.scheduler = Executors.newScheduledThreadPool(4, new SparkThreadFactory()); - this.platform = new SparkPlatform(this); } public void enable() { + this.platform = new SparkPlatform(this); this.platform.enable(); } |