Class ConfigLocaleReader
java.lang.Object
dev.demeng.pluginbase.locale.reader.ConfigLocaleReader
- All Implemented Interfaces:
LocaleReader
A locale reader that uses Bukkit config files (such as .yml) instead of standard resource bundles
(.properties). This should typically only be used if you want to have a singular locale file,
such as a "messages.yml".
- See Also:
-
Constructor Details
-
ConfigLocaleReader
public ConfigLocaleReader()
-
-
Method Details
-
containsKey
Description copied from interface:LocaleReaderReturns whether this reader contains a mapping for the given key.- Specified by:
containsKeyin interfaceLocaleReader- Parameters:
key- Key to check for- Returns:
trueif this reader has a mapping for the key
-
get
Description copied from interface:LocaleReaderReturns the mapping value for this key. It is recommended that this only return values ifLocaleReader.containsKey(String)is true, otherwise throwing an exception to avoid confusion.- Specified by:
getin interfaceLocaleReader- Parameters:
key- Key to fetch for- Returns:
- The string value
-
getArray
Description copied from interface:LocaleReaderReturns the mapping value for this key. It is recommended that this only return values ifLocaleReader.containsKey(String)is true, otherwise throwing an exception to avoid confusion.- Specified by:
getArrayin interfaceLocaleReader- Parameters:
key- Key to fetch for- Returns:
- The string array value
-