ViewHub

interface ViewHub

Hub interface for packet-based visual perspective and entity appearance manipulation.

Provides methods to control the player's camera, toggle entity glowing, transform entity types, and adjust entity scale and orientation — all via packets without modifying actual server state.

Inheritors

Functions

Link copied to clipboard
abstract fun resetCamera(player: Player)

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

Link copied to clipboard
abstract fun sendActionBar(player: Player, message: String)

Sends an action bar message to the player via a packet.

Link copied to clipboard
abstract fun sendCamera(player: Player, entityId: Int)

Sets the player's camera to the specified entity.

Link copied to clipboard
abstract fun sendTitle(player: Player, title: String, subtitle: String, fadeIn: Int, stay: Int, fadeOut: Int)

Sends a title and subtitle to the player via packets.

Link copied to clipboard
abstract fun setCameraEntity(player: Player, entityId: Int)

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

Link copied to clipboard
abstract fun setEntityGlowing(player: Player, entityId: Int, glowing: Boolean)

Sets the glowing visual effect on an entity for the player via a metadata packet.

Link copied to clipboard
abstract fun setEntityScale(player: Player, entityId: Int, scale: Float)

Sets the display scale of an entity for the player via a metadata packet.

Link copied to clipboard
abstract fun setEntityUpsideDown(player: Player, entityId: Int, upsideDown: Boolean)

Sets whether an entity appears upside-down for the player via a metadata packet.

Link copied to clipboard
abstract fun setFakeSkyColor(player: Player, color: Int)

Sends a fake sky/fog color to the player (via biome hack or similar).

Link copied to clipboard
abstract fun transformEntityType(player: Player, entityId: Int, type: EntityType)

Sends a fake entity type transformation to the player, making the entity appear as a different type without changing it server-side.