mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2025-04-22 11:03:26 -04:00
Override platform name and version in VV platform
This commit is contained in:
parent
08f8a6a35a
commit
1a038c0674
2 changed files with 12 additions and 3 deletions
src/main/java/net/raphimc/viaproxy/protocoltranslator/impl
|
@ -18,13 +18,13 @@
|
|||
package net.raphimc.viaproxy.protocoltranslator.impl;
|
||||
|
||||
import com.viaversion.vialoader.impl.platform.ViaLegacyPlatformImpl;
|
||||
import net.raphimc.viaproxy.ViaProxy;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
|
||||
public class ViaProxyViaLegacyPlatformImpl extends ViaLegacyPlatformImpl {
|
||||
|
||||
@Override
|
||||
public String getCpeAppName() {
|
||||
return "ViaProxy " + ViaProxy.VERSION;
|
||||
return Via.getPlatform().getPlatformName() + " " + Via.getPlatform().getPlatformVersion();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,6 +32,16 @@ public class ViaProxyViaVersionPlatformImpl extends ViaVersionPlatformImpl {
|
|||
super(ViaProxy.getCwd());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlatformName() {
|
||||
return "ViaProxy";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlatformVersion() {
|
||||
return ViaProxy.VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(UUID uuid, String msg) {
|
||||
super.sendMessage(uuid, ConsoleFormatter.convert(msg));
|
||||
|
@ -41,7 +51,6 @@ public class ViaProxyViaVersionPlatformImpl extends ViaVersionPlatformImpl {
|
|||
public JsonObject getDump() {
|
||||
final JsonObject root = new JsonObject();
|
||||
|
||||
root.addProperty("version", ViaProxy.VERSION);
|
||||
root.addProperty("impl_version", ViaProxy.IMPL_VERSION);
|
||||
|
||||
final JsonArray plugins = new JsonArray();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue