PacketBuilder

class PacketBuilder(player: Player)

Top-level DSL builder for sending various packet-based effects to a Player.

Obtain an instance via the packet top-level 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 actionBar(message: String)

Sends an action bar message to the player.

Link copied to clipboard
fun bowAnimation(entityId: Int)
Link copied to clipboard
fun camera(entityId: Int)

Sets the player's camera to the specified entity.

Link copied to clipboard
fun deathScreen(message: String)
Link copied to clipboard
fun eatingAnimation(entityId: Int)
Link copied to clipboard
fun entityMotion(entityId: Int, velocity: Vector)
Link copied to clipboard
fun experienceBar(bar: Float, level: Int, experience: Int)
Link copied to clipboard
fun fakeBlocks(builder: FakeBlockBuilder.() -> Unit)

Sends fake block changes visible only to this player.

Link copied to clipboard
fun fakeEquipment(entityId: Int, slot: EquipmentSlot, item: ItemStack)
Link copied to clipboard
fun fakeFurnaceProgress(cookProgress: Int, fuelProgress: Int)
Link copied to clipboard
fun fakeItemSlot(windowId: Int, slot: Int, item: ItemStack)
Link copied to clipboard
fun fakePlayerName(target: Player, newName: String)
Link copied to clipboard
fun fakeWorldBorder(size: Double, centerX: Double, centerZ: Double, warningBlocks: Int = 5, warningTime: Int = 15)
Link copied to clipboard
fun guardPose(entityId: Int)
Link copied to clipboard
fun hideEntity(entityId: Int)
Link copied to clipboard
fun itemCooldown(material: Material, ticks: Int)
Link copied to clipboard
fun metadata(entityId: Int, builder: MetadataBuilder.() -> Unit)

Sends entity metadata to the player.

Link copied to clipboard
fun openSign(location: Location, front: Boolean = true)

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

Link copied to clipboard
fun particles(type: Particle, builder: ParticleBuilder.() -> Unit)

Sends a particle effect to the player.

Link copied to clipboard
fun sendFakeEntity(type: EntityType, location: Location, builder: FakeEntityBuilder.() -> Unit)

Spawns a client-side fake entity visible only to this player.

Link copied to clipboard
fun setCamera(entityId: Int)
Link copied to clipboard
fun showEntity(entityId: Int)
Link copied to clipboard
fun skyColor(color: Int)
Link copied to clipboard
fun sleepAnimation(entityId: Int, location: Location)
Link copied to clipboard
fun sound(builder: SoundBuilder.() -> Unit)

Sends a sound effect to the player.

Link copied to clipboard
fun statistic(statistic: Statistic, value: Int)
Link copied to clipboard
fun title(builder: TitleBuilder.() -> Unit)

Sends a title and subtitle to the player.

Link copied to clipboard
Link copied to clipboard
fun weather(rain: Boolean, thunder: Boolean = false)
Link copied to clipboard
fun worldBorder(builder: WorldBorderBuilder.() -> Unit)

Sends a world border update to the player.