Packages com.phoenixplugins.phoenixcrates.api crate events

public class CrateOpenEvent extends org.bukkit.event.Event
Represents an event that occurs when a crate is opened by a player. This event contains information about the crate and the player interacting with it.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final CrateInstance
    The crate instance associated with this event.
    protected final org.bukkit.entity.Player
    The player associated with this event.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CrateOpenEvent(CrateInstance crate, org.bukkit.entity.Player player)
    Constructor for the CrateOpenEvent.
    CrateOpenEvent(CrateInstance crate, org.bukkit.entity.Player player, List<org.bukkit.inventory.ItemStack> consumedKeyItems)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Retrieves the handler list for this event.
    org.bukkit.event.HandlerList
    Gets the list of handlers for this event.
    List<CompletableFuture<Boolean>>
     
    Retrieves the type of crate being opened.
    void
    holdRewardsUntil(CompletableFuture<Boolean> approval)
     

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • crate

      protected final CrateInstance crate
      The crate instance associated with this event.

      Represents the specific crate that is being opened or interacted with.

    • player

      protected final org.bukkit.entity.Player player
      The player associated with this event.

      Represents the player who triggered the crate opening or interaction.

  • Constructor Details

    • CrateOpenEvent

      public CrateOpenEvent(CrateInstance crate, org.bukkit.entity.Player player)
      Constructor for the CrateOpenEvent. Initializes the event with the crate instance and the player who opened it.
      Parameters:
      crate - the crate being opened
      player - the player who opened the crate
    • CrateOpenEvent

      public CrateOpenEvent(CrateInstance crate, org.bukkit.entity.Player player, List<org.bukkit.inventory.ItemStack> consumedKeyItems)
  • Method Details

    • holdRewardsUntil

      public void holdRewardsUntil(CompletableFuture<Boolean> approval)
    • getRewardHolds

      public List<CompletableFuture<Boolean>> getRewardHolds()
    • getType

      public CrateType getType()
      Retrieves the type of crate being opened. This is derived from the crate instance.
      Returns:
      the CrateType associated with the crate
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Gets the list of handlers for this event. This is used by the Bukkit event system to manage event listeners.
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      the list of event handlers
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Retrieves the handler list for this event. This is a static method to allow external access to the handler list.
      Returns:
      the HandlerList for this event
Last updated 17 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