Package com.palmergames.util
Class TimeMgmt
java.lang.Object
com.palmergames.util.TimeMgmt
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
static final double
static final double
static final double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
countdownTimeHoursRaw
(long l) static String
countdownTimeMinutesRaw
(long l) static String
countdownTimeSecondsRaw
(long l) static String
formatCountdownTime
(long l) static String
formatCountdownTime
(Long l, Locale locale) static String
formatCountdownTimeHours
(long l, org.bukkit.entity.Player player) static String
formatCountdownTimeMinutes
(long l, org.bukkit.entity.Player player) static String
formatCountdownTimeSeconds
(long l, org.bukkit.entity.Player player) static String
getFormattedTimeValue
(double timeMillis) static long
Calculates the time in seconds until the next new day event.static long
townyTime
(boolean cache) Calculates the time in seconds until the next new day event.
-
Field Details
-
ONE_SECOND_IN_MILLIS
public static final double ONE_SECOND_IN_MILLIS- See Also:
-
ONE_MINUTE_IN_MILLIS
public static final double ONE_MINUTE_IN_MILLIS- See Also:
-
ONE_HOUR_IN_MILLIS
public static final double ONE_HOUR_IN_MILLIS- See Also:
-
ONE_DAY_IN_MILLIS
public static final double ONE_DAY_IN_MILLIS- See Also:
-
-
Constructor Details
-
TimeMgmt
public TimeMgmt()
-
-
Method Details
-
formatCountdownTime
-
formatCountdownTime
-
countdownTimeHoursRaw
-
countdownTimeMinutesRaw
-
countdownTimeSecondsRaw
-
formatCountdownTimeHours
-
formatCountdownTimeMinutes
-
formatCountdownTimeSeconds
-
getFormattedTimeValue
-
townyTime
public static long townyTime()Calculates the time in seconds until the next new day event. TimeZone specific, including daylight savings.- Returns:
- seconds until event
-
townyTime
public static long townyTime(boolean cache) Calculates the time in seconds until the next new day event. TimeZone specific, including daylight savings.- Parameters:
cache
- - Whether to use caching or not.- Returns:
- seconds until event
-