diff options
Diffstat (limited to 'spark-bungeecord/src')
-rw-r--r-- | spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordPlatformInfo.java | 12 | ||||
-rw-r--r-- | spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordSparkPlugin.java | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordPlatformInfo.java b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordPlatformInfo.java index 91a64c4..67cb17c 100644 --- a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordPlatformInfo.java +++ b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordPlatformInfo.java @@ -20,10 +20,16 @@ package me.lucko.spark.bungeecord; -import me.lucko.spark.common.PlatformInfo; +import me.lucko.spark.common.platform.AbstractPlatformInfo; import net.md_5.bungee.api.ProxyServer; -public class BungeeCordPlatformInfo implements PlatformInfo { +public class BungeeCordPlatformInfo extends AbstractPlatformInfo { + private final ProxyServer proxy; + + public BungeeCordPlatformInfo(ProxyServer proxy) { + this.proxy = proxy; + } + @Override public Type getType() { return Type.PROXY; @@ -36,7 +42,7 @@ public class BungeeCordPlatformInfo implements PlatformInfo { @Override public String getVersion() { - return ProxyServer.getInstance().getVersion(); + return this.proxy.getVersion(); } @Override diff --git a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordSparkPlugin.java b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordSparkPlugin.java index ca02c14..5a3ad23 100644 --- a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordSparkPlugin.java +++ b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordSparkPlugin.java @@ -22,7 +22,7 @@ package me.lucko.spark.bungeecord; import me.lucko.spark.common.SparkPlatform; import me.lucko.spark.common.SparkPlugin; -import me.lucko.spark.common.PlatformInfo; +import me.lucko.spark.common.platform.PlatformInfo; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.plugin.Command; import net.md_5.bungee.api.plugin.Plugin; @@ -77,7 +77,7 @@ public class BungeeCordSparkPlugin extends Plugin implements SparkPlugin { @Override public PlatformInfo getPlatformInfo() { - return new BungeeCordPlatformInfo(); + return new BungeeCordPlatformInfo(getProxy()); } private static final class SparkCommand extends Command implements TabExecutor { |