Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
Changes -> removed test stats
Browse files Browse the repository at this point in the history
  • Loading branch information
EinfacheSache committed Sep 11, 2023
1 parent d8cab85 commit 4a530e0
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.bstats.bungeecord.Metrics;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public final class NeoProtectBungee extends Plugin implements NeoProtectPlugin {
Expand Down Expand Up @@ -53,7 +52,6 @@ public Stats getStats() {
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()),
getProxy().getOnlineCount(),
getProxy().getServers().size(),
Runtime.getRuntime().availableProcessors(),
Expand Down
8 changes: 1 addition & 7 deletions src/main/java/de/cubeattack/neoprotect/core/model/Stats.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class Stats {
private final String versionError;
private final String updateSetting;
private final String neoProtectPlan;
private final String serverPlugins;

private final int playerAmount;
private final int managedServers;
Expand All @@ -26,7 +25,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 versionError, 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, int playerAmount, int managedServers, int coreCount, boolean onlineMode, boolean proxyProtocol) {
this.serverType = serverType.name().toLowerCase();
this.serverVersion = serverVersion;
this.serverName = serverName;
Expand All @@ -39,7 +38,6 @@ public Stats(NeoProtectPlugin.PluginType serverType, String serverVersion, Strin
this.versionError = versionError;
this.updateSetting = updateSetting;
this.neoProtectPlan = neoProtectPlan;
this.serverPlugins = serverPlugins;
this.playerAmount = playerAmount;
this.managedServers = managedServers;
this.coreCount = coreCount;
Expand Down Expand Up @@ -95,10 +93,6 @@ public String getNeoProtectPlan() {
return neoProtectPlan;
}

public String getServerPlugins() {
return serverPlugins;
}

public int getPlayerAmount() {
return playerAmount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected Response callRequest(Request request) {
try {
return client.newCall(request).execute();
} catch (UnknownHostException | SocketTimeoutException | SocketException connectionException) {
if(!request.url().toString().equals(core.getRestAPI().getPasteServer()) && !request.url().toString().equals(core.getRestAPI().getStatsServer())) {
if(core.getRestAPI() != null && !request.url().toString().equals(core.getRestAPI().getPasteServer()) && !request.url().toString().equals(core.getRestAPI().getStatsServer())) {
core.severe(request + " failed cause (" + connectionException + ")");
}else
core.debug(request + " failed cause (" + connectionException + ")");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public Stats getStats() {
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()),
getServer().getOnlinePlayers().size(),
0,
Runtime.getRuntime().availableProcessors(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.bstats.velocity.Metrics;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Objects;
import java.util.logging.Logger;

Expand Down Expand Up @@ -64,7 +63,6 @@ public Stats getStats() {
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()),
getProxy().getPlayerCount(),
getProxy().getAllServers().size(),
Runtime.getRuntime().availableProcessors(),
Expand Down

0 comments on commit 4a530e0

Please sign in to comment.