createEntitySource

abstract fun createEntitySource(entity: McServerEntity, stereo: Boolean = false, decoderInfo: CodecInfo? = OpusDecoderInfo()): ServerEntitySource

Creates a new entity source.

Entity source is a proximity source attached to the specified entity.

Return

A new ServerEntitySource instance.

Parameters

entity

The target entity.

stereo

Whether the source should be stereo (default is false).

decoderInfo

Optional decoder information, default is OpusDecoderInfo.

Throws

when trying to create an entity source for a player. Use createPlayerSource instead.


open fun createEntitySource(entity: McServerEntity, stereo: Boolean = false): ServerEntitySource

Creates a new entity source.

Entity source is a proximity source attached to the specified entity.

Return

A new ServerEntitySource instance.

Parameters

entity

The target entity.

stereo

Whether the source should be stereo (default is false).

Throws

when trying to create an entity source for a player. Use createPlayerSource instead.