Interface Currency
public interface Currency
Represents a currency configured by the server's admin.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the currency exactly the same as it has been configured.getId()
Returns the unique id of this currency.default String
getName()
ReturnsgetConfigName()
, but formats it into the default configured language.getName
(@Nullable CommandSender sender) ReturnsgetConfigName()
, but formats it and translates it to the givensender
.Get the provider of this currency.
-
Method Details
-
getId
String getId()Returns the unique id of this currency.It is promised that this id does not change over runtime, as it might be used to store data in databases.
- Returns:
- The unique id
-
getConfigName
String getConfigName()Returns the name of the currency exactly the same as it has been configured.- Returns:
- The raw name
-
getName
ReturnsgetConfigName()
, but formats it into the default configured language.- Returns:
- The name in the default language
- See Also:
-
getName
ReturnsgetConfigName()
, but formats it and translates it to the givensender
.- Parameters:
sender
- The person from which it should look up the language.null
if it should take the default language- Returns:
- The name in the language of the sender
- See Also:
-
getProvider
CurrencyProvider getProvider()Get the provider of this currency.- Returns:
- The provider that handles the logic
-