Class PacketBlockBreakEvent

java.lang.Object
org.bukkit.event.Event
net.bitbylogic.packetblocks.event.PacketBlockBreakEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PacketBlockBreakEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a PacketBlock is broken by a player.

This event is fired by the PacketBlocks plugin whenever a player breaks a PacketBlock instance in the world.

Handlers may choose to cancel this event to prevent the block from being broken.

In addition, handlers may modify whether items are dropped and whether the block updates its state after being broken.

  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    PacketBlockBreakEvent(org.bukkit.entity.Player player, PacketBlock block, org.bukkit.Location location, org.bukkit.inventory.ItemStack tool)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    boolean
     
    void
    setCancelled(boolean cancel)
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • PacketBlockBreakEvent

      public PacketBlockBreakEvent(org.bukkit.entity.Player player, PacketBlock block, org.bukkit.Location location, org.bukkit.inventory.ItemStack tool)
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • isCancelled

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

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

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event