From d1b764eb8856fdcf7f4997fefe7585297ca866c7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 12 Jul 2021 09:32:13 +0200 Subject: [PATCH] Hotfix StatCommand for no stats --- src/de/steamwar/bungeecore/commands/StatCommand.java | 3 +++ src/de/steamwar/messages/BungeeCore.properties | 1 + 2 files changed, 4 insertions(+) diff --git a/src/de/steamwar/bungeecore/commands/StatCommand.java b/src/de/steamwar/bungeecore/commands/StatCommand.java index 506ecab9..1488dbfa 100644 --- a/src/de/steamwar/bungeecore/commands/StatCommand.java +++ b/src/de/steamwar/bungeecore/commands/StatCommand.java @@ -58,6 +58,9 @@ public class StatCommand extends BasicCommand { Message.send("STAT_SERVER", sender, s.toUpperCase(), LoadEvaluation.getRemoteRamPercentage(s), LoadEvaluation.getRemoteCPULoad(s), integer); } }); + if (serverCounts.isEmpty()) { + Message.send("NO_STATS", sender); + } } catch (Exception e) { throw new SecurityException(e.getMessage(), e); } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index eab98a52..9f3e7013 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -108,6 +108,7 @@ MOD_YELLOW_PLUR=§7Deaktiviere die Mods\n§e{0}\n§7um weiter auf §eSteam§8War #Various commands ALERT=§f{0} STAT_SERVER=§7Server §f{0} - §7Ram §f{1} §7CPU §f{2} §7Server Count §f{3} +NO_STATS=§7Es gibt keine Statistiken, da keine Server online sind #Ban&Mute-Command BAN_TEAM_BANNED={0} §c{1} wurde von {2} {3} gebannt. §f§lGrund: §f{4}