diff --git a/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java b/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java index 50ae1a1f7..3e63582aa 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java @@ -141,6 +141,11 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform { @Override public String getPlatformName() { + return Bukkit.getServer().getName(); + } + + @Override + public String getPlatformVersion() { return Bukkit.getServer().getVersion(); } diff --git a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java index 1bdc6c23d..6cd7d8daa 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java +++ b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java @@ -56,6 +56,11 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener { @Override public String getPlatformName() { + return getProxy().getName(); + } + + @Override + public String getPlatformVersion() { return getProxy().getVersion(); } diff --git a/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java b/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java index 3a92e7f18..9001a24f7 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java +++ b/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java @@ -29,6 +29,13 @@ public interface ViaPlatform { */ String getPlatformName(); + /** + * Get the platform version + * + * @return Platforn version + */ + String getPlatformVersion(); + /** * Get the plugin version * diff --git a/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/DumpSubCmd.java b/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/DumpSubCmd.java index 6c99ee559..59e3945f2 100644 --- a/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/DumpSubCmd.java +++ b/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/DumpSubCmd.java @@ -39,6 +39,7 @@ public class DumpSubCmd extends ViaSubCommand { ProtocolRegistry.SERVER_PROTOCOL, ProtocolRegistry.getSupportedVersions(), Via.getPlatform().getPlatformName(), + Via.getPlatform().getPlatformVersion(), Via.getPlatform().getPluginVersion() ); diff --git a/common/src/main/java/us/myles/ViaVersion/dump/VersionInfo.java b/common/src/main/java/us/myles/ViaVersion/dump/VersionInfo.java index fcba5416d..3c7f81110 100644 --- a/common/src/main/java/us/myles/ViaVersion/dump/VersionInfo.java +++ b/common/src/main/java/us/myles/ViaVersion/dump/VersionInfo.java @@ -14,5 +14,6 @@ public class VersionInfo { private Set enabledProtocols; private String platformName; private String platformVersion; + private String pluginVersion; } diff --git a/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java b/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java index 78df27c07..ccae9006b 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java +++ b/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java @@ -86,7 +86,12 @@ public class SpongePlugin implements ViaPlatform { @Override public String getPlatformName() { - return "Sponge"; + return game.getPlatform().getApi().getName(); + } + + @Override + public String getPlatformVersion() { + return game.getPlatform().getApi().getId(); } @Override