From 1522b8baab3ed29196548587307716b65d0a85bc Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 20 Dec 2021 16:37:39 +0100 Subject: [PATCH] Update BlockCounter Signed-off-by: yoyosource --- .../features/testblock/blockcounter/BlockCounter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java b/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java index ea317ea8..9cd0e5d4 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java @@ -52,7 +52,11 @@ public class BlockCounter { double countPerTNT = (double) count / tntCount; double countPerTick = (double) count / Math.max((lastTick - tick), 1); if (isActive(player)) { - return BauSystem.MESSAGE.parsePrefixed("BLOCK_COUNTER_MESSAGE", player, count, tntCount, (int) (countPerTNT * 10) / 10.0, (int) (countPerTick * 10) / 10.0 * 20.0); + if (countPerTick < 100) { + return BauSystem.MESSAGE.parsePrefixed("BLOCK_COUNTER_MESSAGE_SECOND", player, count, tntCount, (int) (countPerTNT * 10) / 10.0, (int) (countPerTick * 100) / 100.0 * 20); + } else { + return BauSystem.MESSAGE.parsePrefixed("BLOCK_COUNTER_MESSAGE", player, count, tntCount, (int) (countPerTNT * 10) / 10.0, (int) (countPerTick * 100) / 100.0); + } } return null; }