diff --git a/common/src/main/java/host/bloom/ab/common/commands/Handler.java b/common/src/main/java/host/bloom/ab/common/commands/Handler.java index 40283d2..5fdbd94 100644 --- a/common/src/main/java/host/bloom/ab/common/commands/Handler.java +++ b/common/src/main/java/host/bloom/ab/common/commands/Handler.java @@ -83,31 +83,34 @@ private void sendHelpMessage(Sender sender) { triggerStatus = "§aTrigger is not currently enabled."; } - sender.sendMessage(""" - §8§m §r - §6§lBLOOMAB COMMANDS§r: - §e/bab force §6§r: §7Enable force trigger for X seconds - §e/bab forcestop§r: §7Force stop the trigger and keep it disabled until the finish of the attack - §e/bab set maxjps §6§r: §7Set max joins per second - §e/bab set duration §6§r: §7Set trigger duration - §e/bab set location §6§r: §7Set server location - §r - §6§lCONNECTION STATS§r: - §7• §eTrigger joins per second: §6%s rps - §7• §eTrigger duration: §6%s seconds - §7• §eBlock new joins: §6%s - §7• §eCurrent joins per second: §6%s - §7• %s - §8§m §r - """ - .formatted( - plugin.getABConfig().maxJoinsPerSecond, - plugin.getABConfig().triggerDuration, - plugin.getABConfig().blockNewJoins, - plugin.getManager().getCurrentCount(System.currentTimeMillis() / 1000), - triggerStatus - ) - ); + String[] messageLines = { + "§8§m §r", + "§6§lBloomAB COMMANDS§r:", + "§e/bab force §6§r: §7Enable force trigger for X seconds", + "§e/bab forcestop§r: §7Force stop the trigger and keep it disabled until the finish of the attack", + "§e/bab set maxjps §6§r: §7Set max joins per second", + "§e/bab set duration §6§r: §7Set trigger duration", + "§e/bab set location §6§r: §7Set server location", + "§r", + "§6§lCONNECTION STATS§r:", + "§7• §eTrigger joins per second: §6%s rps", + "§7• §eTrigger duration: §6%s seconds", + "§7• §eBlock new joins: §6%s", + "§7• §eCurrent joins per second: §6%s", + "§7• %s", + "§8§m §r" + }; + + String formattedMessage = String.format( + String.join("%n", messageLines), + plugin.getABConfig().maxJoinsPerSecond, + plugin.getABConfig().triggerDuration, + plugin.getABConfig().blockNewJoins, + plugin.getManager().getCurrentCount(System.currentTimeMillis() / 1000), + triggerStatus + ); + + sender.sendMessage(formattedMessage); } }