VfxHub

interface VfxHub

Hub interface for packet-based visual and audio effects.

Provides methods to send block crack animations, entity fire states, fake explosions, lightning strikes, equipment faking, and positional sounds to individual players without affecting the actual server state.

Inheritors

Functions

Link copied to clipboard
abstract fun fakeEquipment(player: Player, entityId: Int, slot: EquipmentSlot, item: ItemStack)

Sends a fake equipment packet to the player for the specified entity slot.

Link copied to clipboard
abstract fun fakeExplosion(player: Player, location: Location, power: Float)

Sends a fake explosion effect to the player at the given location.

Link copied to clipboard
abstract fun fakeLightning(player: Player, location: Location)

Sends a fake lightning strike effect to the player at the given location.

Link copied to clipboard
abstract fun localSound(player: Player, sound: Sound, location: Location, volume: Float = 1.0f, pitch: Float = 1.0f)

Plays a sound at a specific location for the player only, without affecting other players.

Link copied to clipboard
abstract fun sendParticles(player: Player, type: Particle, location: Location, amount: Int, offset: Vector, extra: Double, data: Any?)

Sends a particle effect to the player via a packet.

Link copied to clipboard
abstract fun sendSound(player: Player, type: Sound, volume: Float, pitch: Float, relative: Boolean, offset: Vector)

Sends a named sound effect to the player via a packet.

Link copied to clipboard
abstract fun setBlockCrack(player: Player, location: Location, stage: Int)

Sends a block crack (mining progress) animation to the player.

Link copied to clipboard
abstract fun setEntityOnFire(player: Player, entityId: Int, onFire: Boolean)

Sets the on-fire visual state of an entity for the player via a metadata packet.