mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-11 04:39:00 +00:00
midnight = 12am
noon = 12pm
This commit is contained in:
parent
bb32ec9567
commit
5de354af86
|
@ -155,10 +155,6 @@ public final class DescParseTickFormat
|
|||
|
||||
int hours = 0;
|
||||
int minutes = 0;
|
||||
if (desc.endsWith("pm"))
|
||||
{
|
||||
hours += 12;
|
||||
}
|
||||
|
||||
desc = desc.toLowerCase().replaceAll("[^0-9]", "");
|
||||
|
||||
|
@ -189,6 +185,16 @@ public final class DescParseTickFormat
|
|||
{
|
||||
throw new NumberFormatException();
|
||||
}
|
||||
|
||||
if (desc.endsWith("pm") && hours != 12)
|
||||
{
|
||||
hours += 12;
|
||||
}
|
||||
|
||||
if (desc.endsWith("am") && hours == 12)
|
||||
{
|
||||
hours -= 12;
|
||||
}
|
||||
|
||||
return hoursMinutesToTicks(hours, minutes);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue