public class BlockPiston extends BlockDirectional
ItemType.Context
ADJACENT, drops, placeSound, SIDES
Constructor and Description |
---|
BlockPiston()
Creates the basic (non-sticky) piston block type.
|
BlockPiston(boolean sticky)
Creates a piston block type.
|
Modifier and Type | Method and Description |
---|---|
void |
blockDestroy(GlowPlayer player,
GlowBlock block,
org.bukkit.block.BlockFace face)
Called when a player attempts to destroy a block.
|
boolean |
isSticky()
The piston is either non-sticky (default), or has a sticky behavior.
|
void |
onRedstoneUpdate(GlowBlock me) |
calculateFace, getFace, getRawFace, placeBlock
afterDestroy, afterPlace, blockInteract, canAbsorb, canOverride, canPlaceAt, canTickRandomly, createBlockEntity, getDrops, getMinedDrops, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onNearBlockChanged, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, updatePhysicsAfterEvent, warnMaterialData
getContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
public BlockPiston()
public BlockPiston(boolean sticky)
sticky
- true for the sticky-piston type; false for the basic piston typepublic void blockDestroy(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face)
BlockType
blockDestroy
in class BlockType
player
- The player interactingblock
- The block the player destroyedface
- The block facepublic void onRedstoneUpdate(GlowBlock me)
onRedstoneUpdate
in class BlockType
public boolean isSticky()
Copyright © 2021. All rights reserved.