diff options
Diffstat (limited to 'src/main/java/io/github')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java | 15 | ||||
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java | 10 |
2 files changed, 19 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java index aef92239..57095c9f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 NotEnoughUpdates contributors + * Copyright (C) 2022-2024 NotEnoughUpdates contributors * * This file is part of NotEnoughUpdates. * @@ -1699,11 +1699,16 @@ public class CalendarOverlay { } private List<String> addCountdownCalculatorToTooltip(long millis, List<String> tooltipToModify) { - if (NotEnoughUpdates.INSTANCE.config.misc.showWhenCountdownEnds == 1 || NotEnoughUpdates.INSTANCE.config.misc.showWhenCountdownEnds == 2) { + if (NotEnoughUpdates.INSTANCE.config.misc.showWhenCountdownEnds == 1 || + NotEnoughUpdates.INSTANCE.config.misc.showWhenCountdownEnds == 2) { String formatString = "EEEE, MMM d h:mm a"; - if (NotEnoughUpdates.INSTANCE.config.misc.showWhenCountdownEnds == 2) { formatString = "EEEE, MMM d HH:mm"; } - tooltipToModify.add("§b" + DateTimeFormatter.ofPattern(formatString).format(ZonedDateTime.now().plusSeconds(((millis / 1000))))); - + if (NotEnoughUpdates.INSTANCE.config.misc.showWhenCountdownEnds == 2) { + formatString = "EEEE, MMM d HH:mm"; + } + DateTimeFormatter useFormatter = DateTimeFormatter.ofPattern(formatString); + if (NotEnoughUpdates.INSTANCE.config.misc.useEnglishCountdown) + useFormatter = useFormatter.withLocale(Locale.ENGLISH); + tooltipToModify.add("§b" + useFormatter.format(ZonedDateTime.now().plusSeconds(((millis / 1000))))); } return tooltipToModify; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java index 1f5c84ac..4889c3d1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 NotEnoughUpdates contributors + * Copyright (C) 2022-2024 NotEnoughUpdates contributors * * This file is part of NotEnoughUpdates. * @@ -366,6 +366,14 @@ public class Misc { @Expose @ConfigOption( + name = "Use english countdown", + desc = "Uses english language for countdown instead of your system's selected one" + ) + @ConfigEditorBoolean + public boolean useEnglishCountdown = false; + + @Expose + @ConfigOption( name = "Stop Hearts Bouncing", desc = "Stops the hearts bouncing with regeneration effect" ) |
