ViewBuilder

class ViewBuilder(player: Player)

DSL builder for sending packet-based visual perspective and entity appearance effects to a Player.

Obtain an instance via the Player.view extension 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 camera(entityId: Int)

Sets the player's camera to spectate the specified entity.

Link copied to clipboard
fun glow(entityId: Int, glowing: Boolean = true)

Sets the glowing visual effect on an entity for the player.

Link copied to clipboard

Resets the player's camera back to their own perspective.

Link copied to clipboard
fun scale(entityId: Int, scale: Float)

Sets the display scale of an entity for the player.

Link copied to clipboard
fun transformType(entityId: Int, type: EntityType)

Makes an entity appear as a different type for the player without changing it server-side.

Link copied to clipboard
fun upsideDown(entityId: Int, upsideDown: Boolean = true)

Sets whether an entity appears upside-down for the player.