Class BlockRedstoneChangeEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockRedstoneEvent
dev.piglin.piglinworldapi.event.BlockRedstoneChangeEvent

public class BlockRedstoneChangeEvent extends org.bukkit.event.block.BlockRedstoneEvent
This event is fired when the block redstone level is changed (or not changed, just updated)
  • 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 org.bukkit.block.Block
     

    Fields inherited from class org.bukkit.event.block.BlockEvent

    block
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockRedstoneChangeEvent​(org.bukkit.block.Block source, org.bukkit.block.Block block, int old, int n)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.block.Block
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     

    Methods inherited from class org.bukkit.event.block.BlockRedstoneEvent

    getNewCurrent, getOldCurrent, setNewCurrent

    Methods inherited from class org.bukkit.event.block.BlockEvent

    getBlock

    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

    • source

      protected final org.bukkit.block.Block source
  • Constructor Details

    • BlockRedstoneChangeEvent

      public BlockRedstoneChangeEvent(org.bukkit.block.Block source, org.bukkit.block.Block block, int old, int n)
  • Method Details

    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
    • getSource

      @NotNull public @NotNull org.bukkit.block.Block getSource()
      Returns:
      The initiator of this update
    • hasChanged

      public boolean hasChanged()
      Returns:
      true if old and new redstone levels are different, otherwise false
    • isMinor

      public boolean isMinor()
      Returns:
      true if the status powered/unpowered wasn't changed, false otherwise
    • isOn

      public boolean isOn()
    • wasOn

      public boolean wasOn()
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Overrides:
      getHandlers in class org.bukkit.event.block.BlockRedstoneEvent