1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Add bstats info to see whether local linking is used on backend servers (#600)

This commit is contained in:
chris
2025-07-22 17:03:14 +02:00
committed by GitHub
parent b469c0c057
commit 40d320a619

View File

@@ -46,6 +46,7 @@ import org.geysermc.floodgate.config.FloodgateConfig;
import org.geysermc.floodgate.config.FloodgateConfig.MetricsConfig;
import org.geysermc.floodgate.event.lifecycle.ShutdownEvent;
import org.geysermc.floodgate.platform.util.PlatformUtils;
import org.geysermc.floodgate.platform.util.PlatformUtils.AuthType;
@Listener
@AutoBind
@@ -101,6 +102,15 @@ public final class Metrics {
new SimplePie("floodgate_version", () -> Constants.VERSION)
);
metricsBase.addCustomChart(
new SimplePie("using-backend-server-linking", () -> {
if (platformUtils.authType() == AuthType.PROXIED) {
return String.valueOf(config.getPlayerLink().isEnableOwnLinking());
}
return "false";
})
);
metricsBase.addCustomChart(
new DrilldownPie("platform", () -> Collections.singletonMap(
implementationName,