From 2617335a922f9428ffe24fcb6db7632578f633e4 Mon Sep 17 00:00:00 2001 From: EinfacheSache Date: Wed, 30 Aug 2023 17:47:11 +0200 Subject: [PATCH] Changes -> Added RequestFailed stats --- pom.xml | 2 +- .../de/cubeattack/neoprotect/bungee/NeoProtectBungee.java | 1 + .../java/de/cubeattack/neoprotect/core/model/Stats.java | 8 +++++++- .../de/cubeattack/neoprotect/spigot/NeoProtectSpigot.java | 1 + .../neoprotect/velocity/NeoProtectVelocity.java | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d612b76..7cd28c3 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ com.github.CubeAttack EasyAPI - b04b57c009 + 2b310c7217 io.netty diff --git a/src/main/java/de/cubeattack/neoprotect/bungee/NeoProtectBungee.java b/src/main/java/de/cubeattack/neoprotect/bungee/NeoProtectBungee.java index 60fb94b..611ecf2 100644 --- a/src/main/java/de/cubeattack/neoprotect/bungee/NeoProtectBungee.java +++ b/src/main/java/de/cubeattack/neoprotect/bungee/NeoProtectBungee.java @@ -53,6 +53,7 @@ public Stats getStats() { System.getProperty("os.version"), getDescription().getVersion(), getCore().getVersionResult().getVersionStatus().toString(), + getCore().getVersionResult().getError(), Config.getAutoUpdaterSettings().toString(), getCore().isSetup() ? getCore().getRestAPI().getPlan() : "§cNOT CONNECTED", Arrays.toString(getPlugins().stream().filter(p -> !p.startsWith("cmd_") && !p.equals("reconnect_yaml")).toArray()), diff --git a/src/main/java/de/cubeattack/neoprotect/core/model/Stats.java b/src/main/java/de/cubeattack/neoprotect/core/model/Stats.java index 9d57cfc..110a4c1 100644 --- a/src/main/java/de/cubeattack/neoprotect/core/model/Stats.java +++ b/src/main/java/de/cubeattack/neoprotect/core/model/Stats.java @@ -14,6 +14,7 @@ public class Stats { private final String osVersion; private final String pluginVersion; private final String versionStatus; + private final String versionError; private final String updateSetting; private final String neoProtectPlan; private final String serverPlugins; @@ -25,7 +26,7 @@ public class Stats { private final boolean onlineMode; private final boolean proxyProtocol; - public Stats(NeoProtectPlugin.PluginType serverType, String serverVersion, String serverName, String javaVersion, String osName, String osArch, String osVersion, String pluginVersion, String versionStatus, String updateSetting, String neoProtectPlan, String serverPlugins, int playerAmount, int managedServers, int coreCount, boolean onlineMode, boolean proxyProtocol) { + public Stats(NeoProtectPlugin.PluginType serverType, String serverVersion, String serverName, String javaVersion, String osName, String osArch, String osVersion, String pluginVersion, String versionStatus, String versionError, String updateSetting, String neoProtectPlan, String serverPlugins, int playerAmount, int managedServers, int coreCount, boolean onlineMode, boolean proxyProtocol) { this.serverType = serverType.name().toLowerCase(); this.serverVersion = serverVersion; this.serverName = serverName; @@ -35,6 +36,7 @@ public Stats(NeoProtectPlugin.PluginType serverType, String serverVersion, Strin this.osVersion = osVersion; this.pluginVersion = pluginVersion; this.versionStatus = versionStatus; + this.versionError = versionError; this.updateSetting = updateSetting; this.neoProtectPlan = neoProtectPlan; this.serverPlugins = serverPlugins; @@ -81,6 +83,10 @@ public String getVersionStatus() { return versionStatus; } + public String getVersionError() { + return versionError; + } + public String getUpdateSetting() { return updateSetting; } diff --git a/src/main/java/de/cubeattack/neoprotect/spigot/NeoProtectSpigot.java b/src/main/java/de/cubeattack/neoprotect/spigot/NeoProtectSpigot.java index d3fa8b5..109005e 100644 --- a/src/main/java/de/cubeattack/neoprotect/spigot/NeoProtectSpigot.java +++ b/src/main/java/de/cubeattack/neoprotect/spigot/NeoProtectSpigot.java @@ -50,6 +50,7 @@ public Stats getStats() { System.getProperty("os.version"), getPluginVersion(), getCore().getVersionResult().getVersionStatus().toString(), + getCore().getVersionResult().getError(), Config.getAutoUpdaterSettings().toString(), getCore().isSetup() ? getCore().getRestAPI().getPlan() : "§cNOT CONNECTED", Arrays.toString(getPlugins().stream().filter(p -> !p.startsWith("cmd_") && !p.equals("reconnect_yaml")).toArray()), diff --git a/src/main/java/de/cubeattack/neoprotect/velocity/NeoProtectVelocity.java b/src/main/java/de/cubeattack/neoprotect/velocity/NeoProtectVelocity.java index 8f82294..ea2a3ec 100644 --- a/src/main/java/de/cubeattack/neoprotect/velocity/NeoProtectVelocity.java +++ b/src/main/java/de/cubeattack/neoprotect/velocity/NeoProtectVelocity.java @@ -64,6 +64,7 @@ public Stats getStats() { System.getProperty("os.version"), getPluginVersion(), getCore().getVersionResult().getVersionStatus().toString(), + getCore().getVersionResult().getError(), Config.getAutoUpdaterSettings().toString(), getCore().isSetup() ? getCore().getRestAPI().getPlan() : "§cNOT CONNECTED", Arrays.toString(getPlugins().stream().filter(p -> !p.startsWith("cmd_") && !p.equals("reconnect_yaml")).toArray()),