AbstractDespawnInto

A strategy for placing a despawning item into a particular kind of target block (a container, a cooker, empty air, an entity, or the void). Strategies are tried in order by DespawnProcess.

Inheritors

Constructors

Link copied to clipboard
constructor(plugin: PaperMcDespawnedItems)

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
abstract fun despawnInto(process: DespawnProcess, targetBlock: Block): DespawnIntoResult

Attempts to place DespawnProcess.item into targetBlock.

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

Whether this strategy is applicable to targetBlock.

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

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

abstract fun removeFrom(material: ItemStack, targetBlock: Block)

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