Class LanguageFile
java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.LanguageFile
Typed accessor for the active
languages/<locale>.yml file.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCommonVariable(String name) A common variable by its key name.The default ban reason shown when no reason is provided.The default region description used when creating a new region.The default war description used when a war is declared.The "ago" label for days.The "ago" label for hours.The "ago" label for minutes.The "ago" label for seconds.The format string for displaying a currency balance.The format string for displaying aChunk.The format string for displaying a timestamp with "ago" suffix.The date / time pattern used bySimpleDateFormat.The format string for displaying a human-readable duration.The format string for GUI pagination titles.The format string for displaying aLocation.The format string for a list of player regions.The joining string between player region names.The format string for private / party chat messages.The format string for a list of region members.The joining string between region member names.The format string for a list of war participant regions.The joining string between war region names.The description text for a specific help command.All keys registered under the help command descriptions section.The format for a single help page entry.The footer text shown at the bottom of every help page.The label for the "next page" button.The label for a disabled "next page" button.The hover text for the "next page" button.The label for the "previous page" button.The label for a disabled "previous page" button.The hover text for the "previous page" button.getInputPromptActionbar(String promptId) The action-bar message for a specific input prompt.getInputPromptChat(String promptId) The chat message for a specific input prompt.getInputPromptTitle(String promptId) The title lines shown for a specific input prompt.getLogMessage(String logId) The log message template for a specific log type.The chat prefix prepended to every plugin message.The text shown for a banned player status.Text shown when a flag is set.Text shown when a flag is unset.Disabled-state display text.Enabled-state display text.Boolean display text forfalse.Boolean display text fortrue.The variable placeholder text for the log author.The text shown when a value is not available.The text shown for a "never" timestamp.The text shown when a value is not applicable.The text shown for an offline player status.The text shown for an online player status.The text shown for a permanent (non-expiring) duration.The variable text for the rent vacate notice period.The star character used for level display.getVariableStarColor(int rate) The star colour for a specific rating level.The list of messages broadcast when a war is declared.Methods inherited from class ResourceFile
getBoolean, getBoolean, getConfig, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getKeysUnderPath, getLong, getLong, getRaw, getString, getStringList
-
Constructor Details
-
LanguageFile
- Throws:
FileNotFoundException
-
-
Method Details
-
getString
- Overrides:
getStringin classResourceFile
-
getPrefix
The chat prefix prepended to every plugin message.- Returns:
- the prefix string
-
getDefaultRegionDescription
The default region description used when creating a new region.- Returns:
- the default region description
-
getDefaultWarDescription
The default war description used when a war is declared.- Returns:
- the default war description
-
getDefaultBanReason
The default ban reason shown when no reason is provided.- Returns:
- the default ban reason
-
getWarDeclarationMessages
The list of messages broadcast when a war is declared.- Returns:
- war declaration message lines, never
null
-
getVariableStar
The star character used for level display.- Returns:
- star character string
-
getVariableStarColor
The star colour for a specific rating level.- Parameters:
rate- the rating level (e.g.1–5)- Returns:
- the colour/formatting code
-
getVariableNone
The text shown when a value is not applicable.- Returns:
- "N/A" style text
-
getVariableNa
The text shown when a value is not available.- Returns:
- "N/A" style text
-
getVariablePermanent
The text shown for a permanent (non-expiring) duration.- Returns:
- "Permanent" style text
-
getVariableNever
The text shown for a "never" timestamp.- Returns:
- "Never" style text
-
getVariableIsTrue
-
getVariableIsFalse
Boolean display text forfalse.- Returns:
- "No" / "False" style text
-
getVariableIsEnabled
-
getVariableIsDisabled
-
getVariableFlagSet
-
getVariableFlagUnset
-
getVariableBanned
The text shown for a banned player status.- Returns:
- "Banned" style text
-
getVariableOnline
The text shown for an online player status.- Returns:
- "Online" style text
-
getVariableOffline
The text shown for an offline player status.- Returns:
- "Offline" style text
-
getCommonVariable
-
getFormatterLocation
The format string for displaying aLocation.- Returns:
- location format pattern
-
getFormatterChunk
The format string for displaying aChunk.- Returns:
- chunk format pattern
-
getFormatterBalance
The format string for displaying a currency balance.- Returns:
- balance format pattern
-
getFormatterDateFormat
The date / time pattern used bySimpleDateFormat.- Returns:
- date format pattern
-
getFormatterDate
The format string for displaying a timestamp with "ago" suffix.- Returns:
- date-ago format pattern
-
getFormatterDuration
The format string for displaying a human-readable duration.- Returns:
- duration format pattern
-
getFormatterGuiPaginationTitle
The format string for GUI pagination titles.- Returns:
- pagination title format
-
getFormatterPrivateChat
The format string for private / party chat messages.- Returns:
- private chat format pattern
-
getFormatterPlayerRegions
The format string for a list of player regions.- Returns:
- player regions format
-
getFormatterPlayerRegionsJoining
The joining string between player region names.- Returns:
- region list separator
-
getFormatterRegionMembers
The format string for a list of region members.- Returns:
- region members format
-
getFormatterRegionMembersJoining
The joining string between region member names.- Returns:
- member list separator
-
getFormatterWarRegions
The format string for a list of war participant regions.- Returns:
- war regions format
-
getFormatterWarRegionsJoining
The joining string between war region names.- Returns:
- war region list separator
-
getFormatterAgoDays
-
getFormatterAgoHours
-
getFormatterAgoMinutes
-
getFormatterAgoSeconds
-
getHelpCommandDescriptionKeys
-
getHelpCommandDescription
-
getHelpEntryFormat
The format for a single help page entry.- Returns:
- entry format string
-
getHelpPrevHover
The hover text for the "previous page" button.- Returns:
- previous-page hover text
-
getHelpPrev
-
getHelpPrevDisabled
The label for a disabled "previous page" button.- Returns:
- disabled previous-page label
-
getHelpNextHover
The hover text for the "next page" button.- Returns:
- next-page hover text
-
getHelpNext
-
getHelpNextDisabled
The label for a disabled "next page" button.- Returns:
- disabled next-page label
-
getInputPromptTitle
-
getInputPromptChat
-
getInputPromptActionbar
-
getLogMessage
-
getVariableLogAuthor
The variable placeholder text for the log author.- Returns:
- log-author variable text
-
getVariableRentVacateNotice
The variable text for the rent vacate notice period.- Returns:
- rent-vacate-notice variable text
-