SteamWar/BauSystem2.0
Archiviert
12
0

Update BlockCounter
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-12-20 16:37:39 +01:00
Ursprung a95b6db421
Commit 1522b8baab

Datei anzeigen

@ -52,7 +52,11 @@ public class BlockCounter {
double countPerTNT = (double) count / tntCount; double countPerTNT = (double) count / tntCount;
double countPerTick = (double) count / Math.max((lastTick - tick), 1); double countPerTick = (double) count / Math.max((lastTick - tick), 1);
if (isActive(player)) { 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; return null;
} }