Package org.bukkit.event.block
Class BlockRedstoneEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- org.bukkit.event.block.BlockEvent
-
- org.bukkit.event.block.BlockRedstoneEvent
-
public class BlockRedstoneEvent extends BlockEvent
Called when a redstone current changes
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
-
Field Summary
-
Fields inherited from class org.bukkit.event.block.BlockEvent
block
-
-
Constructor Summary
Constructors Constructor Description BlockRedstoneEvent(Block block, int oldCurrent, int newCurrent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HandlerListgetHandlerList()HandlerListgetHandlers()intgetNewCurrent()Gets the new current of this blockintgetOldCurrent()Gets the old current of this blockvoidsetNewCurrent(int newCurrent)Sets the new current of this block-
Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock
-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Constructor Detail
-
BlockRedstoneEvent
public BlockRedstoneEvent(@NotNull Block block, int oldCurrent, int newCurrent)
-
-
Method Detail
-
getOldCurrent
public int getOldCurrent()
Gets the old current of this block- Returns:
- The previous current
-
getNewCurrent
public int getNewCurrent()
Gets the new current of this block- Returns:
- The new current
-
setNewCurrent
public void setNewCurrent(int newCurrent)
Sets the new current of this block- Parameters:
newCurrent- The new current to set
-
getHandlers
@NotNull public HandlerList getHandlers()
- Specified by:
getHandlersin classEvent
-
getHandlerList
@NotNull public static HandlerList getHandlerList()
-
-