Packages com.phoenixplugins.phoenixcrates.api crate events

Class CratePlaceEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class CratePlaceEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a player places a crate block in the world. Can be cancelled to prevent the placement.
  • 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
    Whether this event has been cancelled.
    protected final CrateType
    The crate type that was placed.
    protected final org.bukkit.inventory.EquipmentSlot
     
    protected final org.bukkit.Location
    The location where the crate was placed.
    protected final org.bukkit.entity.Player
    The player who placed the crate.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CratePlaceEvent(CrateType crate, org.bukkit.entity.Player player, org.bukkit.Location location)
    Constructs a new CratePlaceEvent.
    CratePlaceEvent(CrateType crate, org.bukkit.entity.Player player, org.bukkit.Location location, org.bukkit.inventory.EquipmentSlot hand)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Returns the static handler list for this event type.
    org.bukkit.event.HandlerList
     
    org.bukkit.entity.Player
    Returns the player who placed the crate.
    boolean
     
    void
    setCancelled(boolean cancelled)
     

    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 CrateType crate
      The crate type that was placed.
    • player

      protected final org.bukkit.entity.Player player
      The player who placed the crate.
    • location

      protected final org.bukkit.Location location
      The location where the crate was placed.
    • hand

      protected final org.bukkit.inventory.EquipmentSlot hand
    • cancelled

      protected boolean cancelled
      Whether this event has been cancelled.
  • Constructor Details

    • CratePlaceEvent

      public CratePlaceEvent(CrateType crate, org.bukkit.entity.Player player, org.bukkit.Location location)
      Constructs a new CratePlaceEvent.
      Parameters:
      crate - the crate type that was placed
      player - the player who placed the crate
      location - the location where the crate was placed
    • CratePlaceEvent

      public CratePlaceEvent(CrateType crate, org.bukkit.entity.Player player, org.bukkit.Location location, org.bukkit.inventory.EquipmentSlot hand)
  • Method Details

    • getWhoPlaced

      public org.bukkit.entity.Player getWhoPlaced()
      Returns the player who placed the crate.
      Returns:
      the placing player
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • 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 handler list for this event type.
      Returns:
      the handler list
Last updated 7 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