feat: some first changes

Add placeholders for time values, new formatting function and call for new function.
This commit is contained in:
sebampuero
2025-03-14 01:47:15 +01:00
committed by hyperdefined
parent 4fe4c2be25
commit d5324b5db6
3 changed files with 40 additions and 3 deletions

View File

@@ -815,8 +815,8 @@ public class ItemLore {
}
container.set(toolStats.flightTime, PersistentDataType.LONG, flightTime + duration);
String oldFlightFormatted = toolStats.numberFormat.formatDouble((double) flightTime / 1000);
String newFlightFormatted = toolStats.numberFormat.formatDouble((double) (flightTime + duration) / 1000);
String oldFlightFormatted = toolStats.numberFormat.formatTime(flightTime);
String newFlightFormatted = toolStats.numberFormat.formatTime(flightTime + duration);
Component oldLine = toolStats.configTools.formatLore("flight-time", "{time}", oldFlightFormatted);
Component newLine = toolStats.configTools.formatLore("flight-time", "{time}", newFlightFormatted);
if (oldLine == null || newLine == null) {