Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buypublic interface CratesManager
Implementations handle lifecycle, persistence, and caching internally. Consumers should use only these methods to interact with crates and crate types.
| Modifier and Type | Method and Description |
|---|---|
int |
countRegisteredTypes()
Returns the number of registered crate types.
|
CrateInstance |
getCrateByBlock(org.bukkit.block.Block block)
Gets the crate instance located at the given block.
|
Set<String> |
getCratesIdentifier()
Returns the identifiers of all registered crate types.
|
List<? extends CrateType> |
getCrateTypes()
Returns only the enabled crate types.
|
List<? extends OpeningSession> |
getPlayerOpeningSessions(org.bukkit.entity.Player player)
Gets all active crate opening sessions for a given player.
|
List<? extends CrateType> |
getRegisteredTypes()
Returns all registered crate types.
|
CrateType |
getTypeByIdentifier(String key)
Finds a crate type by its identifier.
|
List<? extends CrateType> getRegisteredTypes()
NOTE: The reference implementation maps an internal cache (e.g. CachedCrateType)
to CrateType instances. This mapping operation is moderately expensive, so avoid
repeatedly calling this in performance-sensitive paths.
int countRegisteredTypes()
This is a fast operation that avoids mapping overhead. Prefer this over
getRegisteredTypes() when only the count is needed.
List<? extends CrateType> getCrateTypes()
Set<String> getCratesIdentifier()
Like getRegisteredTypes(), this performs a mapping operation, so
cache results when calling repeatedly.
CrateType getTypeByIdentifier(String key)
key - the identifier to look upCrateType if found, otherwise null
CrateInstance getCrateByBlock(org.bukkit.block.Block block)
block - the block to checknull
List<? extends OpeningSession> getPlayerOpeningSessions(org.bukkit.entity.Player player)
player - the player
Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buy