Class HoneypotPrePlayerInteractEvent

java.lang.Object
org.bukkit.event.Event
org.reprogle.honeypot.api.events.HoneypotPrePlayerInteractEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class HoneypotPrePlayerInteractEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Event that is triggered before a Honeypot inventory is interacted with. This event is called before the interaction, not after. This event is cancellable. If cancelled, the inventory is opened as if it was a regular block.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    HoneypotPrePlayerInteractEvent(org.bukkit.entity.Player player, org.bukkit.block.Block block)
    Called before action is taken on a player who interacted with Honeypot inventory.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.block.Block
    Get the block that was involved in the event
    static org.bukkit.event.HandlerList
    Boilerplate function for Bukkit
    org.bukkit.event.HandlerList
    Boilerplate function for Bukkit
    org.bukkit.entity.Player
    Get the player that broke the block
    boolean
    Check if the event is cancelled
    void
    setCancelled(boolean cancel)
    Set the event as cancelled or not

    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
  • Constructor Details

    • HoneypotPrePlayerInteractEvent

      public HoneypotPrePlayerInteractEvent(org.bukkit.entity.Player player, org.bukkit.block.Block block)
      Called before action is taken on a player who interacted with Honeypot inventory. If cancelled, the Honeypot is ignored
      Parameters:
      player - The Player interacting with the Honeypot
      block - The Honeypot block
  • Method Details

    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Boilerplate function for Bukkit
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      HandlerList
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Boilerplate function for Bukkit
      Returns:
      HandlerList
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Get the player that broke the block
      Returns:
      Player
    • getBlock

      public org.bukkit.block.Block getBlock()
      Get the block that was involved in the event
      Returns:
      Block
    • isCancelled

      public boolean isCancelled()
      Check if the event is cancelled
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      True if cancelled, false if not
    • setCancelled

      public void setCancelled(boolean cancel)
      Set the event as cancelled or not
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - Boolean value notating if the event is cancelled or not