Promotion background
Easter Season IS HERE!
10% off limited time offer!
Ends in
00
H
00
M
00
S
limited time offer SAVE 10% NOW →
Packages com.phoenixplugins.phoenixcrates.api managers
com.phoenixplugins.phoenixcrates.api.managers

Interface CratesManager



  • public interface CratesManager
    Class for managing crate types and crate instances.

    Implementations handle lifecycle, persistence, and caching internally. Consumers should use only these methods to interact with crates and crate types.

    • Method Detail

      • getRegisteredTypes

        List<? extends CrateType> getRegisteredTypes()
        Returns all registered crate types.

        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.

        Returns:
        a snapshot list of all registered crate types
      • countRegisteredTypes

        int countRegisteredTypes()
        Returns the number of registered crate types.

        This is a fast operation that avoids mapping overhead. Prefer this over getRegisteredTypes() when only the count is needed.

        Returns:
        the number of registered crate types
      • getCrateTypes

        List<? extends CrateType> getCrateTypes()
        Returns only the enabled crate types.
        Returns:
        a snapshot list of enabled crate types
      • getCratesIdentifier

        Set<String> getCratesIdentifier()
        Returns the identifiers of all registered crate types.

        Like getRegisteredTypes(), this performs a mapping operation, so cache results when calling repeatedly.

        Returns:
        a set of type identifiers
      • getTypeByIdentifier

        CrateType getTypeByIdentifier(String key)
        Finds a crate type by its identifier.
        Parameters:
        key - the identifier to look up
        Returns:
        the CrateType if found, otherwise null
      • getCrateByBlock

        CrateInstance getCrateByBlock(org.bukkit.block.Block block)
        Gets the crate instance located at the given block.
        Parameters:
        block - the block to check
        Returns:
        the crate instance if present, otherwise null
      • getPlayerOpeningSessions

        List<? extends OpeningSession> getPlayerOpeningSessions(org.bukkit.entity.Player player)
        Gets all active crate opening sessions for a given player.
        Parameters:
        player - the player
        Returns:
        a list of active opening sessions
Last updated about 3 hours ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy
This site uses cookies to personalize content, enhance your experience. By continuing, you agree to our cookie use. Learn more