ServerboundUseItemOnPacketUtil

Util class for attaching and working with the ServerboundUseItemOnPacket for user-defined interaction with items on ... by the player.

Types

Link copied to clipboard
data class BlockHitResult(var direction: ServerboundPlayerActionPacketUtil.Direction, var x: Int, var y: Int, var z: Int, var type: ServerboundUseItemOnPacketUtil.ItemUseType, var inside: Boolean, var worldBorderHit: Boolean)
Link copied to clipboard
data class UseItemOnEvent(var blockHit: ServerboundUseItemOnPacketUtil.BlockHitResult, var hand: ServerboundSwingPacketUtil.InteractionHand, var sequence: Int, var timestamp: Long)

Functions

Link copied to clipboard
fun attach(name: String, plugin: JavaPlugin, player: Player, callback: ServerboundUseItemOnPacketUtil.UseItemOnEvent.() -> Unit): Boolean

Attach the Event to the Player.