Package org.bukkit.entity
Interface FallingBlock
- All Superinterfaces:
- Audience,- CommandSender,- Entity,- HoverEventSource<HoverEvent.ShowEntity>,- Metadatable,- Nameable,- Permissible,- PersistentDataHolder,- Pointered,- ServerOperator,- Sound.Emitter
Represents a falling block
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.bukkit.entity.EntityEntity.Spigot
- 
Method SummaryModifier and TypeMethodDescriptionbooleanGet the HurtEntities state of this block.booleanSets if this falling block should expire after: - 30 seconds - 5 seconds and is outside of the worldGet the data for the falling blockfloatGet the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.booleanGet if the falling block will break into an item if it cannot be placedDeprecated.intGet the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.default LocationDeprecated.replaced byEntity.getOrigin()voidsetDamagePerBlock(float damage) Set the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.voidsetDropItem(boolean drop) Set if the falling block will break into an item if it cannot be placedvoidsetHurtEntities(boolean hurtEntities) Set the HurtEntities state of this block.voidsetMaxDamage(int damage) Set the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.voidshouldAutoExpire(boolean autoExpires) Sets if this falling block should expire after: - 30 seconds - 5 seconds and is outside of the worldMethods inherited from interface net.kyori.adventure.audience.AudienceclearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSendergetName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.EntityaddPassenger, addScoreboardTag, asHoverEvent, collidesAt, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface net.kyori.adventure.text.event.HoverEventSourceasHoverEventMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.NameablecustomName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.PermissibleaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainerMethods inherited from interface net.kyori.adventure.pointer.Pointeredget, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.permissions.ServerOperatorisOp, setOp
- 
Method Details- 
getMaterialDeprecated.usegetBlockData()Get the Material of the falling block- Returns:
- Material of the block
 
- 
getBlockDataGet the data for the falling block- Returns:
- data of the block
 
- 
getDropItemboolean getDropItem()Get if the falling block will break into an item if it cannot be placed- Returns:
- true if the block will break into an item when obstructed
 
- 
setDropItemvoid setDropItem(boolean drop) Set if the falling block will break into an item if it cannot be placed- Parameters:
- drop- true to break into an item when obstructed
 
- 
canHurtEntitiesboolean canHurtEntities()Get the HurtEntities state of this block.- Returns:
- whether entities will be damaged by this block.
 
- 
setHurtEntitiesvoid setHurtEntities(boolean hurtEntities) Set the HurtEntities state of this block.- Parameters:
- hurtEntities- whether entities will be damaged by this block.
 
- 
getDamagePerBlockfloat getDamagePerBlock()Get the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.- Returns:
- the damage per block
 
- 
setDamagePerBlockvoid setDamagePerBlock(float damage) Set the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.If damageis non-zero, this method will automatically callsetHurtEntities(true).- Parameters:
- damage- the damage per block to set. Must be >= 0.0
 
- 
getMaxDamageint getMaxDamage()Get the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.- Returns:
- the max damage
 
- 
setMaxDamagevoid setMaxDamage(int damage) Set the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.If damageis non-zero, this method will automatically callsetHurtEntities(true).- Parameters:
- damage- the max damage to set. Must be >= 0
 
- 
getSourceLocDeprecated.replaced byEntity.getOrigin()Gets the source block location of the FallingBlock- Returns:
- the source block location the FallingBlock was spawned from
 
- 
doesAutoExpireboolean doesAutoExpire()Sets if this falling block should expire after: - 30 seconds - 5 seconds and is outside of the world- Returns:
- if this behavior occurs
 
- 
shouldAutoExpirevoid shouldAutoExpire(boolean autoExpires) Sets if this falling block should expire after: - 30 seconds - 5 seconds and is outside of the world- Parameters:
- autoExpires- if this behavior should occur
 
 
- 
getBlockData()