Package org.bukkit.event.block

# Class BlockPistonExtendEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockPistonEvent
org.bukkit.event.block.BlockPistonExtendEvent

All Implemented Interfaces:
  `Cancellable`

public class BlockPistonExtendEvent extends BlockPistonEvent
Called when a piston extends

## 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
`BlockPistonExtendEvent(@NotNull Block block, int length, @NotNull BlockFace direction)`
Deprecated.
`BlockPistonExtendEvent(@NotNull Block block, @NotNull List<Block> blocks, @NotNull BlockFace direction)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull List<Block>`
`getBlocks()`
Get an immutable list of the blocks which will be moved by the extending.
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`int`
`getLength()`
Deprecated.
slime blocks make the value of this method inaccurate due to blocks being pushed at the side

### Methods inherited from class org.bukkit.event.block.BlockPistonEvent

`getDirection, isCancelled, isSticky, setCancelled`

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

`getBlock`

### 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

### BlockPistonExtendEvent

@Deprecated public BlockPistonExtendEvent(@NotNull @NotNull Block block, int length, @NotNull @NotNull BlockFace direction)
Deprecated.

### BlockPistonExtendEvent

public BlockPistonExtendEvent(@NotNull @NotNull Block block, @NotNull @NotNull List<Block> blocks, @NotNull @NotNull BlockFace direction)

## Method Details

### getLength

@Deprecated public int getLength()
Deprecated.
slime blocks make the value of this method inaccurate due to blocks being pushed at the side
Get the amount of blocks which will be moved while extending.

Returns:
  the amount of moving blocks

### getBlocks

@NotNull public @NotNull List<Block> getBlocks()
Get an immutable list of the blocks which will be moved by the extending.

Returns:
  Immutable list of the moved blocks.

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()