From f6a3fbd22e709db6c243403e4ba4ade8922b6305 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 1 May 2021 11:00:28 +0200 Subject: [PATCH] Fix TpsCommand and update look --- .../bausystem/features/other/TpsCommand.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java index 8c45ed11..ebf58b2d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java @@ -30,21 +30,25 @@ import org.bukkit.entity.Player; @Linked(LinkageType.COMMAND) public class TpsCommand extends SWCommand { - protected TpsCommand() { + public TpsCommand() { super("tps"); + unregister(); + register(); } @Register(help = true) public void genericCommand(Player p, String... args) { - p.sendMessage(ColorConfig.BASE + "TPS:"); - p.sendMessage(ColorConfig.HIGHLIGHT.toString() + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_SECOND) + ColorConfig.OTHER + ", " + - ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.TEN_SECONDS) + ColorConfig.OTHER + ", " + - ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_MINUTE)); + p.sendMessage(ColorConfig.BASE + "TPS: 1s 10s 1m 5m 10m"); + p.sendMessage(" " + + ColorConfig.HIGHLIGHT.toString() + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_SECOND) + ColorConfig.OTHER + " " + + ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.TEN_SECONDS) + ColorConfig.OTHER + " " + + ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_MINUTE) + ColorConfig.OTHER + " " + + ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.FIVE_MINUTES) + ColorConfig.OTHER + " " + + ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.TEN_MINUTES) + ColorConfig.OTHER + " "); } @Register public void genericCommand(Player p, TPSWatcher.TPSType type) { - p.sendMessage(ColorConfig.BASE + "TPS:"); - p.sendMessage(ColorConfig.HIGHLIGHT.toString() + TPSWarpUtils.getTps(type)); + p.sendMessage(ColorConfig.BASE + "TPS: " + ColorConfig.HIGHLIGHT.toString() + TPSWarpUtils.getTps(type)); } }