mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-06 06:41:44 +00:00
fix #99
This commit is contained in:
@@ -940,10 +940,12 @@ public class ItemLore {
|
|||||||
Map<String, String> newFlightFormatted = toolStats.numberFormat.formatTime(flightTime + duration);
|
Map<String, String> newFlightFormatted = toolStats.numberFormat.formatTime(flightTime + duration);
|
||||||
// if the old format is in the config, check to see if the old format is on the elytra
|
// if the old format is in the config, check to see if the old format is on the elytra
|
||||||
if (toolStats.config.getString("messages.flight-time-old") != null) {
|
if (toolStats.config.getString("messages.flight-time-old") != null) {
|
||||||
|
if (meta.hasLore()) {
|
||||||
String oldFormatFormatted = toolStats.numberFormat.formatDouble((double) flightTime / 1000);
|
String oldFormatFormatted = toolStats.numberFormat.formatDouble((double) flightTime / 1000);
|
||||||
Component oldFormat = toolStats.configTools.formatLore("flight-time-old", "{time}", oldFormatFormatted);
|
Component oldFormat = toolStats.configTools.formatLore("flight-time-old", "{time}", oldFormatFormatted);
|
||||||
meta.lore(removeLore(meta.lore(), oldFormat));
|
meta.lore(removeLore(meta.lore(), oldFormat));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Component oldLine = toolStats.configTools.formatLoreMultiplePlaceholders("flight-time", oldFlightFormatted);
|
Component oldLine = toolStats.configTools.formatLoreMultiplePlaceholders("flight-time", oldFlightFormatted);
|
||||||
Component newLine = toolStats.configTools.formatLoreMultiplePlaceholders("flight-time", newFlightFormatted);
|
Component newLine = toolStats.configTools.formatLoreMultiplePlaceholders("flight-time", newFlightFormatted);
|
||||||
if (oldLine == null || newLine == null) {
|
if (oldLine == null || newLine == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user