Packages com.phoenixplugins.phoenixcrates.api crate events

Class CratePreviewOpenEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class CratePreviewOpenEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Represents an event that occurs when a player opens a crate preview. This event can be cancelled, preventing the preview from being opened.
  • 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 boolean
    Indicates whether the crate preview event has been cancelled.
    protected final CrateType
    The type of crate being previewed in this event.
    protected final org.bukkit.entity.Player
    The player associated with this preview event.
    protected final String
    The identifier or menu name for the crate preview.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CratePreviewOpenEvent(CrateType crateType, String previewMenu, org.bukkit.entity.Player player)
    Constructor for the CratePreviewOpenEvent.
  • 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.
    boolean
    Gets the cancellation status of this event.
    void
    setCancelled(boolean cancelled)
    Sets the cancellation status of this event.

    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

    • crateType

      protected final CrateType crateType
      The type of crate being previewed in this event.

      Represents the specific crate configuration or category being previewed.

    • previewMenu

      protected final String previewMenu
      The identifier or menu name for the crate preview.

      Can be used to display or reference the preview interface for the crate.

    • player

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

      Represents the player who is attempting to view the crate preview.

    • cancelled

      protected boolean cancelled
      Indicates whether the crate preview event has been cancelled.

      Setting this to true will prevent the preview from being shown.

  • Constructor Details

    • CratePreviewOpenEvent

      public CratePreviewOpenEvent(CrateType crateType, String previewMenu, org.bukkit.entity.Player player)
      Constructor for the CratePreviewOpenEvent. Initializes the event with the crate type, preview menu identifier, and player who is attempting to preview the crate.
      Parameters:
      crateType - the type of crate being previewed
      previewMenu - the name/identifier of the preview menu
      player - the player attempting to view the crate preview
  • Method Details

    • 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
    • isCancelled

      public boolean isCancelled()
      Gets the cancellation status of this event. If the event is cancelled, the crate preview will not be shown to the player.
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      true if the event is cancelled, false otherwise
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets the cancellation status of this event. If the event is cancelled, the crate preview will be prevented from opening.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancelled - true to cancel the event, false to allow the crate preview to open
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