Class WorkstationRemoveHighlightEvent

java.lang.Object
org.bukkit.event.Event
simplexity.villagerinfo.events.WorkstationRemoveHighlightEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class WorkstationRemoveHighlightEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a workstation highlight is to be removed
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    WorkstationRemoveHighlightEvent(org.bukkit.entity.Villager villager, org.bukkit.entity.BlockDisplay blockDisplay, org.bukkit.NamespacedKey namespacedKey)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.entity.BlockDisplay
    Gets the BlockDisplay involved in this event
    static org.bukkit.event.HandlerList
    Gets the handler list for this evene
    @NotNull org.bukkit.event.HandlerList
    Gets the handler list for this evene
    org.bukkit.entity.Villager
    Gets the villager involved in this event
    boolean
    Gets if the event has been cancelled
    void
    Removes the linked block display from the world, turns the villager's PDC switch off, and removes them from the hashmap
    void
    setCancelled(boolean cancel)
    Sets whether the event should be cancelled
    void
    Turns off a villager's PDC switch

    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

    • WorkstationRemoveHighlightEvent

      public WorkstationRemoveHighlightEvent(org.bukkit.entity.Villager villager, org.bukkit.entity.BlockDisplay blockDisplay, org.bukkit.NamespacedKey namespacedKey)
  • Method Details

    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Gets the handler list for this evene
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      HandlerList
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets the handler list for this evene
      Returns:
      HandlerList
    • isCancelled

      public boolean isCancelled()
      Gets if the event has been cancelled
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      boolean
    • setCancelled

      public void setCancelled(boolean cancel)
      Sets whether the event should be cancelled
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - true if you wish to cancel this event
    • getVillager

      public org.bukkit.entity.Villager getVillager()
      Gets the villager involved in this event
      Returns:
      org.bukkit.entity.Villager
    • getBlockDisplay

      public org.bukkit.entity.BlockDisplay getBlockDisplay()
      Gets the BlockDisplay involved in this event
      Returns:
      BlockDisplay
    • setVillagerPDCSwitchOff

      public void setVillagerPDCSwitchOff()
      Turns off a villager's PDC switch
    • killBlockDisplay

      public void killBlockDisplay()
      Removes the linked block display from the world, turns the villager's PDC switch off, and removes them from the hashmap