From ad952cb58f7e7ae2086bfbf36a6b1944a3d13829 Mon Sep 17 00:00:00 2001 From: RayzsYT <51991564+RayzsYT@users.noreply.github.com> Date: Sun, 14 Jul 2024 03:27:02 +0200 Subject: [PATCH] Replace Timings --- .../de/rayzs/pat/plugin/process/CommandProcess.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/rayzs/pat/plugin/process/CommandProcess.java b/src/main/java/de/rayzs/pat/plugin/process/CommandProcess.java index 46e78f9a..016b3426 100644 --- a/src/main/java/de/rayzs/pat/plugin/process/CommandProcess.java +++ b/src/main/java/de/rayzs/pat/plugin/process/CommandProcess.java @@ -66,7 +66,13 @@ public class CommandProcess { } int finalFound = found; - Storage.ConfigSections.Messages.STATS.STATISTIC.getLines().forEach(message -> sender.sendMessage(message.replace("%groups_amount%", String.valueOf(GroupManager.getGroupNames().size())).replace("%server_count%", String.valueOf(Communicator.SERVER_DATA_SYNC_COUNT)).replace("%last_sync_time%", TimeConverter.calcAndGetTime(Communicator.LAST_DATA_UPDATE)).replace("%servers%", finalFound > 0 ? statsBuilder : Storage.ConfigSections.Messages.STATS.NO_SERVER))); + + Storage.ConfigSections.Messages.STATS.STATISTIC.getLines().forEach(message -> sender.sendMessage(message.replace("%groups_amount%", String.valueOf(GroupManager.getGroupNames().size())) + .replace("%server_count%", String.valueOf(Communicator.SERVER_DATA_SYNC_COUNT)) + .replace("%last_sync_time%", TimeConverter.calcAndGetTime(Communicator.LAST_DATA_UPDATE)) + .replace("%servers%", finalFound > 0 ? statsBuilder : Storage.ConfigSections.Messages.STATS.NO_SERVER)) + ); + return; case "reload": @@ -89,7 +95,7 @@ public class CommandProcess { sender.sendMessage( StringUtils.buildStringList(Storage.ConfigSections.Messages.INFO.MESSAGE.getLines()) - .replace("%sync_time%", Storage.ConfigSections.Settings.HANDLE_THROUGH_PROXY.ENABLED || Reflection.isProxyServer() ? Storage.ConfigSections.Messages.INFO.SYNC_TIME.replace("%time%", TimeConverter.calcAndGetTime(Reflection.isProxyServer() ? Communicator.LAST_DATA_UPDATE : Storage.LAST_SYNC)) : Storage.ConfigSections.Messages.INFO.SYNC_DISABLED) + .replace("%sync_time%", Storage.ConfigSections.Settings.HANDLE_THROUGH_PROXY.ENABLED || Reflection.isProxyServer() ? Storage.ConfigSections.Messages.INFO.SYNC_TIME.replace("%time%", TimeConverter.calcAndGetTime(Reflection.isProxyServer() ? Communicator.LAST_DATA_UPDATE : Communicator.LAST_BUKKIT_SYNC)) : Storage.ConfigSections.Messages.INFO.SYNC_DISABLED) .replace("%version_status%", Storage.OUTDATED ? Storage.ConfigSections.Messages.INFO.VERSION_OUTDATED : Storage.ConfigSections.Messages.INFO.VERSION_UPDATED) );