ChamoItemSkins
Toggle table of contents
1.0.0
java
Target filter
java
Switch theme
Search in API
Skip to content
ChamoItemSkins
plugin
/
net.chamosmp.chamoitemskins.manager
/
RarityManager
Rarity
Manager
public
final
class
RarityManager
Loads and serves user-defined rarity tiers from config.yml.
Members
Constructors
Rarity
Manager
Link copied to clipboard
public
void
RarityManager
(
@
NotNull
(
)
@
NotNull
(
)
Plugin
plugin
)
Constructs a new RarityManager.
Functions
get
Default
Rarity
Link copied to clipboard
@
NotNull
(
)
public
@
NotNull
(
)
Rarity
getDefaultRarity
(
)
Gets the default rarity (the one with the lowest priority).
get
Rarities
Link copied to clipboard
@
NotNull
(
)
public
@
NotNull
(
)
List
<
Rarity
>
getRarities
(
)
Gets all loaded rarities, sorted by priority.
get
Rarity
Link copied to clipboard
@
NotNull
(
)
public
@
NotNull
(
)
Optional
<
Rarity
>
getRarity
(
@
NotNull
(
)
@
NotNull
(
)
String
id
)
Gets a rarity by its ID.
get
Rarity
Map
Link copied to clipboard
@
NotNull
(
)
public
@
NotNull
(
)
Map
<
String
,
Rarity
>
getRarityMap
(
)
Gets an unmodifiable map of all rarities.
is
Enabled
Link copied to clipboard
public
boolean
isEnabled
(
)
Checks if rarity features are enabled.
load
Link copied to clipboard
public
void
load
(
@
NotNull
(
)
@
NotNull
(
)
FileConfiguration
config
)
Loads rarities from the given configuration.
resolve
Link copied to clipboard
@
NotNull
(
)
public
@
NotNull
(
)
Rarity
resolve
(
@
Nullable
(
)
@
Nullable
(
)
String
id
)
Resolves a rarity ID to a Rarity object, falling back to default if not found.