Interface PunishmentFormatter
public interface PunishmentFormatter
Contains what little API exists for formatting punishments
-
Method Summary
Modifier and TypeMethodDescriptionformatAbsoluteDate(Instant date) Formats an absolute date in conjunction withgetTimezone()andgetDateTimeFormatter().formatDuration(Duration duration) Formats a duration.Formats a punishment type according to the configurationFormats a punishment type as a verb according to the configurationformatScope(ServerScope scope) Formats a server scope according to the configurationGets the configured date time formatter used for displaying datesGets the configured timezone
-
Method Details
-
formatPunishmentType
Formats a punishment type according to the configuration- Parameters:
type- the punishment type to format- Returns:
- the formatted string
-
formatPunishmentTypeVerb
Formats a punishment type as a verb according to the configuration- Parameters:
type- the punishment type to format- Returns:
- the formatted string
-
getTimezone
-
getDateTimeFormatter
DateTimeFormatter getDateTimeFormatter()Gets the configured date time formatter used for displaying dates- Returns:
- the date time formatter
-
formatAbsoluteDate
Formats an absolute date in conjunction withgetTimezone()andgetDateTimeFormatter().
The maximum instant (Instant.MAX) may be passed to indicate a time so far in the future as to be considered the end of a permanent punishment.- Parameters:
date- the date to format- Returns:
- the formatted string
-
formatDuration
-
formatScope
Formats a server scope according to the configuration- Parameters:
scope- the server scope- Returns:
- the formatted string
-