mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-19 14:59:27 +00:00
Indicate 1.21.112/1.21.113 support, track server platform types in bstats metrics
This commit is contained in:
@@ -271,6 +271,11 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
|
||||
return Paths.get(getProxy().getName().equals("BungeeCord") ? "proxy.log.0" : "logs/latest.log");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getServerPlatform() {
|
||||
return getProxy().getName();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public SocketAddress getSocketAddress() {
|
||||
|
||||
@@ -238,4 +238,9 @@ public abstract class GeyserModBootstrap implements GeyserBootstrap {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getServerPlatform() {
|
||||
return server.getServerModName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,6 +402,11 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
|
||||
return this.minecraftVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getServerPlatform() {
|
||||
return Bukkit.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketAddress getSocketAddress() {
|
||||
return this.geyserInjector.getServerSocketAddress();
|
||||
|
||||
@@ -314,6 +314,11 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
|
||||
return new GeyserStandaloneDumpInfo(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getServerPlatform() {
|
||||
return PlatformType.STANDALONE.platformName();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getServerBindAddress() {
|
||||
|
||||
@@ -230,6 +230,11 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
||||
return new GeyserVelocityDumpInfo(proxyServer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getServerPlatform() {
|
||||
return proxyServer.getVersion().getName();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public SocketAddress getSocketAddress() {
|
||||
|
||||
@@ -230,6 +230,11 @@ public class GeyserViaProxyPlugin extends ViaProxyPlugin implements GeyserBootst
|
||||
return new GeyserViaProxyDumpInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getServerPlatform() {
|
||||
return PlatformType.VIAPROXY.platformName();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getServerBindAddress() {
|
||||
|
||||
Reference in New Issue
Block a user