Skip to content

API reference Obsidian.API.Blocks

BlockBreakContext class

A player's attempt to break a plugin block, before removal and drops.

public sealed class BlockBreakContext

In Obsidian.API.

Constructors

public BlockBreakContext();

Properties

public required IBlock Block { get; init; }

ExtraDrops

public IList<ItemStack> ExtraDrops { get; }

Extra stacks to drop after this hook, including when IsCancelled keeps the block. The host copies them before returning from the hook and owns the item entities. Creative and spectator breaks suppress them.

public required BlockShapeHit Hit { get; init; }public bool IsCancelled { get; set; }public required IPlayer Player { get; init; }

On this page