diff --git a/paper-server/src/main/java/com/destroystokyo/paper/Metrics.java b/paper-server/src/main/java/com/destroystokyo/paper/Metrics.java index 9f4d73fd321f..acaaf456969b 100644 --- a/paper-server/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/paper-server/src/main/java/com/destroystokyo/paper/Metrics.java @@ -1,5 +1,6 @@ package com.destroystokyo.paper; +import io.papermc.paper.configuration.GlobalConfiguration; import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; @@ -8,6 +9,7 @@ import org.json.simple.JSONArray; import org.json.simple.JSONObject; +import org.spigotmc.SpigotConfig; import javax.net.ssl.HttpsURLConnection; import java.io.ByteArrayOutputStream; @@ -23,14 +25,12 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.util.zip.GZIPOutputStream; /** * bStats collects some data for plugin authors. - * - * Check out https://bstats.org/ to learn more about bStats! + *
+ * Check out bstats.org to learn more about bStats!
*/
public class Metrics {
@@ -602,7 +602,7 @@ public static void startMetrics() {
}));
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
- metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : "offline"));
+ metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getServerConfig().isProxyOnlineMode() ? "online" : "offline"));
final String paperVersion;
final String implVersion = org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion();
if (implVersion != null) {
@@ -619,26 +619,7 @@ public static void startMetrics() {
Map