packet
Entry point for the packet DSL. Applies action to a PacketBuilder for the given player.
Parameters
player
The target player.
action
DSL block for sending packet-based effects.
Extension function for Player that provides packet DSL access.
This is a convenience wrapper around the top-level packet function, allowing for more idiomatic usage when the player instance is already available.
Example:
player.packet {
title {
title = "Welcome"
subtitle = "to the server"
}
actionBar("Use /help for commands")
}Content copied to clipboard
Parameters
action
DSL block for configuring packet-based effects to send to this player.