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:
@@ -46,6 +46,7 @@ import org.geysermc.floodgate.config.FloodgateConfig;
|
|||||||
import org.geysermc.floodgate.config.FloodgateConfig.MetricsConfig;
|
import org.geysermc.floodgate.config.FloodgateConfig.MetricsConfig;
|
||||||
import org.geysermc.floodgate.event.lifecycle.ShutdownEvent;
|
import org.geysermc.floodgate.event.lifecycle.ShutdownEvent;
|
||||||
import org.geysermc.floodgate.platform.util.PlatformUtils;
|
import org.geysermc.floodgate.platform.util.PlatformUtils;
|
||||||
|
import org.geysermc.floodgate.platform.util.PlatformUtils.AuthType;
|
||||||
|
|
||||||
@Listener
|
@Listener
|
||||||
@AutoBind
|
@AutoBind
|
||||||
@@ -101,6 +102,15 @@ public final class Metrics {
|
|||||||
new SimplePie("floodgate_version", () -> Constants.VERSION)
|
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(
|
metricsBase.addCustomChart(
|
||||||
new DrilldownPie("platform", () -> Collections.singletonMap(
|
new DrilldownPie("platform", () -> Collections.singletonMap(
|
||||||
implementationName,
|
implementationName,
|
||||||
|
|||||||
Reference in New Issue
Block a user