Packages com.phoenixplugins.phoenixcrates.api crate

Interface CrateType


public interface CrateType
Represents a specific configuration of a crate. Defines key properties such as the display name, engine configuration, cost, and key requirements.
  • Method Details

    • isEnabled

      boolean isEnabled()
      Checks if this crate is enabled. If the crate is disabled, it will not be available for players to open.
      Returns:
      true if the crate is enabled, false otherwise.
    • getIdentifier

      String getIdentifier()
      Gets the unique identifier for this crate. The identifier is used to reference the crate within the system.
      Returns:
      the unique identifier for the crate.
    • getDisplayName

      String getDisplayName()
      Retrieves the display name of the crate. The name will be shown to players, typically in the UI or when interacting with the crate.
      Returns:
      the display name of the crate.
    • getBlockType

      CrateBlockType getBlockType()
      Gets the type of block this crate uses. The block type could determine the appearance and interaction mechanics for the crate.
      Returns:
      the CrateBlockType used for the crate.
    • getEngineType

      EngineType getEngineType()
      Gets the engine type associated with this crate. The engine type defines how the crate operates (e.g., animation, opening mechanics).
      Returns:
      the EngineType for this crate.
    • getEngineData

      EngineData getEngineData()
      Retrieves the engine data related to this crate. The engine data contains the specific configurations for how the crate should behave.
      Returns:
      the EngineData containing the crate's engine configuration.
    • getOpenMoneyCost

      double getOpenMoneyCost()
      Gets the money cost required to open the crate. The cost can be a currency or in-game economy value needed to interact with the crate.
      Returns:
      the monetary cost to open this crate.
    • getCostEngineType

      default CostEngineType getCostEngineType()
      Gets the cost engine (payment method) used to charge players when opening this crate.

      Not every tier supports pluggable cost engines; unsupported implementations will throw.

      Returns:
      the CostEngineType for this crate.
    • getOpenCooldownSeconds

      int getOpenCooldownSeconds()
      Gets the cooldown time (in seconds) between openings of this crate.
      Returns:
      cooldown in seconds
    • isSimultaneousOpeningsEnabled

      boolean isSimultaneousOpeningsEnabled()
      Returns whether multiple players can open this crate simultaneously.
      Returns:
      true if simultaneous openings are allowed
    • isPreviewItemEnabled

      boolean isPreviewItemEnabled()
      Returns whether players can preview the crate item before opening.
      Returns:
      true if preview is enabled
    • isPermissionRequired

      boolean isPermissionRequired()
      Checks whether a permission is required to open this crate.
      Returns:
      true if a permission is required
    • getPermission

      String getPermission()
      Gets the permission string required to open this crate, if applicable.
      Returns:
      permission string
    • getHologramProperties

      default HologramProperties getHologramProperties()
      Retrieves the hologram properties configuration associated with this instance.
      Returns:
      the HologramProperties containing all hologram-related settings and data
    • getHologramLines

      @ScheduledForRemoval @Deprecated default List<String> getHologramLines()
      Deprecated.
      Returns the hologram text lines defined within the hologram properties.

      This method is deprecated and scheduled for removal; use HologramProperties.get(String) instead.

      Returns:
      a list of hologram lines, or an empty list if none are defined
    • getHologramOffset

      @ScheduledForRemoval @Deprecated default double getHologramOffset()
      Deprecated.
      Returns the vertical offset value defined in the hologram properties.

      This method is deprecated and scheduled for removal; use HologramProperties.getOffset() instead.

      Returns:
      the hologram offset value
    • getRewardsMenuName

      String getRewardsMenuName()
      Returns the name of the rewards menu for this crate.
      Returns:
      rewards menu name
    • getSelectRewardMenuName

      String getSelectRewardMenuName()
      Returns the name of the select reward menu.
      Returns:
      select reward menu name
    • getBroadcastMessage

      List<String> getBroadcastMessage()
      Returns the broadcast message sent when a reward is won.
      Returns:
      broadcast message
    • isKeyRequired

      boolean isKeyRequired()
      Checks if a key is required to open this crate.
      Returns:
      true if a key is required
    • getLinkedKeysIds

      Set<String> getLinkedKeysIds()
      Gets the set of key identifiers linked to this crate. These identifiers represent the different keys that can unlock the crate.
      Returns:
      a set of linked key IDs.
    • getGuaranteedRewardType

      GuaranteedRewardType getGuaranteedRewardType()
      Returns the type of guaranteed reward associated with this crate type.
      Returns:
      guaranteed reward type
    • isGuaranteedRewardDisabled

      default boolean isGuaranteedRewardDisabled()
      Returns whether the guaranteed reward feature is disabled for this crate.
      Returns:
      true if guaranteed rewards are disabled, false otherwise
    • getRegisteredRewards

      List<? extends Reward> getRegisteredRewards()
      Returns a list of registered rewards.

      These rewards may be disabled or invalid, if you need only available rewards use getAvailableRewards()

      Returns:
      list of valid rewards
    • getAvailableRewards

      List<? extends Reward> getAvailableRewards()
      Returns a cached list of rewards that are currently valid.

      Caches the result to avoid repeatedly filtering the full reward list. If the cache is invalidated, it will be rebuilt on next access.

      Returns:
      list of valid rewards
    • getRewardByIdentifier

      Reward getRewardByIdentifier(String identifier)
      Returns the registered reward with the given identifier.

      Performs a case-insensitive match against the reward identifiers.

      Parameters:
      identifier - the identifier of the reward to fetch
      Returns:
      the reward with the matching identifier, or null if not found
    • createItemStack

      default org.bukkit.inventory.ItemStack createItemStack()
Last updated 22 days ago
My Cart
Spider

Your cart is empty

Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping