public class BlockDoor extends BlockType
ItemType.ContextADJACENT, drops, placeSound, SIDES| Constructor and Description |
|---|
BlockDoor(org.bukkit.Material itemMaterial) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
blockInteract(GlowPlayer player,
GlowBlock block,
org.bukkit.block.BlockFace face,
org.bukkit.util.Vector clickedLoc)
Opens and closes the door when right-clicked by the player.
|
boolean |
canPlaceAt(GlowPlayer player,
GlowBlock block,
org.bukkit.block.BlockFace against)
Check whether the block can be placed at the given location.
|
void |
onBlockChanged(GlowBlock block,
org.bukkit.Material oldType,
byte oldData,
org.bukkit.Material newType,
byte newData)
Called when this block has just changed to some other type.
|
void |
onRedstoneUpdate(GlowBlock block) |
void |
placeBlock(GlowPlayer player,
GlowBlockState state,
org.bukkit.block.BlockFace face,
org.bukkit.inventory.ItemStack holding,
org.bukkit.util.Vector clickedLoc)
Called when a block is placed to calculate what the block will become.
|
afterDestroy, afterPlace, blockDestroy, canAbsorb, canOverride, canTickRandomly, createBlockEntity, getDrops, getMinedDrops, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, isPulseOnce, leftClickBlock, onEntityStep, onNearBlockChanged, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, updatePhysicsAfterEvent, warnMaterialDatagetContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toStringpublic boolean canPlaceAt(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace against)
BlockTypecanPlaceAt in class BlockTypeplayer - The player who placed the block.block - The location the block is being placed at.against - The face the block is being placed against.public void onBlockChanged(GlowBlock block, org.bukkit.Material oldType, byte oldData, org.bukkit.Material newType, byte newData)
BlockTypeThis is called whenever GlowBlock.setTypeIdAndData(int, byte, boolean), GlowBlock.setType(org.bukkit.Material)
or GlowBlock.setData(byte) is called with physics enabled, and might
be called from plugins or other means of changing the block.
onBlockChanged in class BlockTypeblock - The block that was changedoldType - The old MaterialoldData - The old datanewType - The new MaterialnewData - The new datapublic void placeBlock(GlowPlayer player, GlowBlockState state, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, org.bukkit.util.Vector clickedLoc)
BlockTypeplaceBlock in class BlockTypeplayer - the player who placed the blockstate - the BlockState to editface - the face off which the block is being placedholding - the ItemStack that was being heldclickedLoc - where in the block the click occurredpublic boolean blockInteract(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.util.Vector clickedLoc)
blockInteract in class BlockTypeplayer - the player interactingblock - the block interacted withface - the clicked faceclickedLoc - where in the block the click occurredpublic void onRedstoneUpdate(GlowBlock block)
onRedstoneUpdate in class BlockTypeCopyright © 2021. All rights reserved.