Class BlockRedstoneEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockRedstoneEvent
Called when a redstone current changes.
It includes the relevant mutation of the powered and power
properties even if the block is not able to produce a redstone signal.
For the powered property, a high state will be considered as
a current of 15 and a low state as 0. Setting the new current to a different
value will prevent most action in this case.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class BlockEvent
block -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList@IntRange(from=0L,to=15L) intGets the new current of this block.@IntRange(from=0L,to=15L) intGets the old current of this block.voidsetNewCurrent(@IntRange(from=0L,to=15L) int newCurrent) Sets the new current of this block.Methods inherited from class BlockEvent
getBlockMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
BlockRedstoneEvent
-
-
Method Details
-
getOldCurrent
public @IntRange(from=0L,to=15L) int getOldCurrent()Gets the old current of this block.- Returns:
- the previous current
-
getNewCurrent
public @IntRange(from=0L,to=15L) int getNewCurrent()Gets the new current of this block.- Returns:
- the new current
-
setNewCurrent
public void setNewCurrent(@IntRange(from=0L,to=15L) int newCurrent) Sets the new current of this block.- Parameters:
newCurrent- the new current to set
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-