Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-04 23:30:24 +01:00
Implement PlatformVersion for better dump output
Dieser Commit ist enthalten in:
Ursprung
68fc884d2a
Commit
4142797380
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,13 @@ public interface ViaPlatform<T> {
|
||||
*/
|
||||
String getPlatformName();
|
||||
|
||||
/**
|
||||
* Get the platform version
|
||||
*
|
||||
* @return Platforn version
|
||||
*/
|
||||
String getPlatformVersion();
|
||||
|
||||
/**
|
||||
* Get the plugin version
|
||||
*
|
||||
|
@ -39,6 +39,7 @@ public class DumpSubCmd extends ViaSubCommand {
|
||||
ProtocolRegistry.SERVER_PROTOCOL,
|
||||
ProtocolRegistry.getSupportedVersions(),
|
||||
Via.getPlatform().getPlatformName(),
|
||||
Via.getPlatform().getPlatformVersion(),
|
||||
Via.getPlatform().getPluginVersion()
|
||||
);
|
||||
|
||||
|
@ -14,5 +14,6 @@ public class VersionInfo {
|
||||
private Set<Integer> enabledProtocols;
|
||||
private String platformName;
|
||||
private String platformVersion;
|
||||
private String pluginVersion;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren