Interface Currency


public interface Currency
Represents a currency configured by the server's admin.
  • 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

      default String getName()
      Returns getConfigName(), but formats it into the default configured language.
      Returns:
      The name in the default language
      See Also:
    • getName

      String getName(@Nullable @Nullable CommandSender sender)
      Returns getConfigName(), but formats it and translates it to the given sender.
      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