DespawnBlockIntoAir

Places a block item back into the world at an empty target location, doing its best to carry over the item's stored block data and tile-entity state (banners, skulls, container contents, sign text, spawners, and so on).

Faithfully carrying every possible block state is effectively impossible via the Bukkit API, so this covers the common cases and refuses items that are hazardous to place (explosives, gravity blocks, redstone, liquids, etc.).

Constructors

Link copied to clipboard
constructor(plugin: PaperMcDespawnedItems)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val supportsRemoval: Boolean = true

Whether this strategy participates in bulk removal (removeFrom). Regression pin: DespawnIntoVoid applies to every block but removes nothing, so leaving it in the removal chain short-circuited /despi purge — no container was ever purged.

Functions

Link copied to clipboard
open override fun despawnInto(process: DespawnProcess, targetBlock: Block): DespawnIntoResult

Attempts to place DespawnProcess.item into targetBlock.

Link copied to clipboard
open override fun doesApply(targetBlock: Block): Boolean

Whether this strategy is applicable to targetBlock.

Link copied to clipboard
open override fun removeFrom(material: Material, targetBlock: Block)

Removes all of material from targetBlock (used by bulk purges).

open override fun removeFrom(material: ItemStack, targetBlock: Block)

Removes items matching material from targetBlock (used by bulk purges).