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 TypeMethodDescriptionReturns the name of the rarity exactly the same as it has been configured.getId()Returns the unique id of this cosmetic item.default StringgetName()ReturnsgetConfigName(), but formats it into the default configured language.getName(@Nullable CommandSender sender) ReturnsgetConfigName(), but formats it and translates it to the givensender.booleanGet 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
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.nullif 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:
trueif this rarity is being used for items with no explicitly assigned rarity
-