diff options
author | Luck <git@lucko.me> | 2019-05-20 09:57:38 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2019-05-20 09:57:38 +0100 |
commit | fce29989563103fe8b36c60e3942a658ff62a9ce (patch) | |
tree | ba28b5219afd8c6fe58ed1d060bba8a84f67b13a /spark-velocity/src/main/java/me/lucko | |
parent | aaa03b1cde9595afacfecd1a24e4540eda40a02a (diff) | |
download | spark-fce29989563103fe8b36c60e3942a658ff62a9ce.tar.gz spark-fce29989563103fe8b36c60e3942a658ff62a9ce.tar.bz2 spark-fce29989563103fe8b36c60e3942a658ff62a9ce.zip |
Fix plugin init (#15)
Diffstat (limited to 'spark-velocity/src/main/java/me/lucko')
-rw-r--r-- | spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java b/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java index 4a5f500..7cf345a 100644 --- a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java +++ b/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java @@ -53,11 +53,11 @@ import java.util.stream.Collectors; ) public class SparkVelocityPlugin implements SparkPlugin, Command { - private final SparkPlatform platform = new SparkPlatform(this); - private final ProxyServer proxy; private final Path configDirectory; + private SparkPlatform platform; + @Inject public SparkVelocityPlugin(ProxyServer proxy, @DataDirectory Path configDirectory) { this.proxy = proxy; @@ -66,6 +66,7 @@ public class SparkVelocityPlugin implements SparkPlugin, Command { @Subscribe(order = PostOrder.FIRST) public void onEnable(ProxyInitializeEvent e) { + this.platform = new SparkPlatform(this); this.platform.enable(); this.proxy.getCommandManager().register(this, "sparkv", "sparkvelocity"); } |