Packages com.phoenixplugins.phoenixcrates.api crate events

Class CrateSelectiveConfirmEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class CrateSelectiveConfirmEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Fired immediately before a selective-mode reward opening is confirmed by the player.

This event is called after the player clicks a reward in the CrateSelectRewardMenu and confirms their choice, but before Crate#openCrate(OpeningContext) is actually invoked. Listeners may cancel this event to abort the opening entirely.

Primary use-cases include:

  • Verifying that the player still physically holds the required item (e.g. a lootbox) before the reward is granted.
  • Consuming or transferring an item as part of the opening cost.
  • Any addon-level gate that should block reward delivery.

If the event is cancelled, the confirming listener is responsible for sending any relevant feedback message to the player. The reward menu is not automatically re-opened after cancellation.

  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    CrateSelectiveConfirmEvent(CrateInstance crate, org.bukkit.entity.Player player, BaseReward selectedReward)
    Constructs a new CrateSelectiveConfirmEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Returns the static HandlerList for this event type.
    org.bukkit.event.HandlerList

    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

    Methods inherited from interface org.bukkit.event.Cancellable

    isCancelled, setCancelled
  • Constructor Details

    • CrateSelectiveConfirmEvent

      public CrateSelectiveConfirmEvent(CrateInstance crate, org.bukkit.entity.Player player, BaseReward selectedReward)
      Constructs a new CrateSelectiveConfirmEvent.
      Parameters:
      crate - the crate being opened
      player - the player who confirmed the reward
      selectedReward - the reward the player chose
  • Method Details

    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Returns the static HandlerList for this event type.
      Returns:
      the handler list
Last updated 10 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