InteractBuilder

class InteractBuilder(player: Player)

DSL builder for sending packet-based interaction effects to a Player.

Obtain an instance via the Player.interact extension function.

Parameters

player

The target player for all operations in this builder.

Constructors

Link copied to clipboard
constructor(player: Player)

Functions

Link copied to clipboard
fun fakeBlock(location: Location, material: Material)

Sends a fake block placement packet to the player.

Link copied to clipboard
fun forceHeldSlot(slot: Int)

Forces the player's held item slot to the specified index via a packet.

Link copied to clipboard

Hides the end credits screen for the player via a packet.

Link copied to clipboard
fun lockSlot(slot: Int, item: ItemStack?)

Locks an inventory slot for the player by sending a fake item packet.

Link copied to clipboard
fun removeFakeBlock(location: Location)

Sends a fake block removal packet to the player, restoring the original block appearance.

Link copied to clipboard

Shows the end credits screen to the player via a packet.