InteractHub

interface InteractHub

Hub interface for packet-based player interaction manipulation.

Provides methods to place/remove fake blocks, lock inventory slots, force held slot changes, and control the credits screen — all via packets without modifying actual server state.

Inheritors

Functions

Link copied to clipboard
abstract fun forceHeldSlot(player: Player, slot: Int)

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

Link copied to clipboard
abstract fun hideCredits(player: Player)

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

Link copied to clipboard
abstract fun lockInventorySlot(player: Player, slot: Int, item: ItemStack?)

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

Link copied to clipboard
abstract fun placeFakeBlock(player: Player, location: Location, material: Material)

Sends a fake block placement packet to the player at the given location.

Link copied to clipboard
abstract fun removeFakeBlock(player: Player, location: Location)

Sends a fake block removal packet to the player at the given location, restoring the appearance of the original block.

Link copied to clipboard
abstract fun sendFakeBlocks(player: Player, builder: FakeBlockBuilder.() -> Unit)

Sends fake block changes to the player using a FakeBlockBuilder.

Link copied to clipboard
abstract fun sendOpenSign(player: Player, location: Location, front: Boolean)

Opens a sign editor for the player at the given location.

Link copied to clipboard
abstract fun showCredits(player: Player)

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