Interface Rarity


public interface Rarity
Represents a rarity of a cosmetic item.

A rarity refers to the quality or price of an item. More fancy items usually have a higher rarity.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the rarity exactly the same as it has been configured.
    Returns the unique id of this cosmetic item.
    default String
    Returns getConfigName(), but formats it into the default configured language.
    getName(@Nullable CommandSender sender)
    Returns getConfigName(), but formats it and translates it to the given sender.
    boolean
    Get whether this rarity is choosen by default for items.
  • Method Details

    • getId

      String getId()
      Returns the unique id of this cosmetic item.

      It is promised that this id does not change over runtime.

      Returns:
      The unique id
    • getConfigName

      String getConfigName()
      Returns the name of the rarity exactly the same as it has been configured.
      Returns:
      The raw name
      See Also:
    • 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:
    • isDefault

      boolean isDefault()
      Get whether this rarity is choosen by default for items.

      There can only be one default rarity, which is only being used if the server admin didn't assign a rarity to an item.

      Returns:
      true if this rarity is being used for items with no explicitly assigned rarity