ServerboundUseItemPacketUtil

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

Types

Link copied to clipboard
data class UseItemEvent(var hand: ServerboundSwingPacketUtil.InteractionHand, var sequence: Int, var yRot: Float, var xRot: Float, var timestamp: Long)

Functions

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

Attach the Event to the Player.