Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VoiceChannel

Hierarchy

Index

Constructors

constructor

  • new VoiceChannel(isSpatial: boolean, maxDistance: number): VoiceChannel
  • Creates a new voice channel.

    remarks

    This throws an error when the voice chat is not activated on serverside.

    Parameters

    • isSpatial: boolean

      Whether the voice channel should be 3D (e.g. talking in person) or 1D (e.g. talking over a telephone).

    • maxDistance: number

      The max distance at which you can hear each other.

    Returns VoiceChannel

Properties

filter

filter: number

Readonly id

id: number

Readonly isSpatial

isSpatial: boolean

Readonly maxDistance

maxDistance: number

Readonly playerCount

playerCount: number

Readonly players

players: readonly Player[]

priority

priority: number

Readonly refCount

refCount: number

Returns the ref count of the entity.

remarks

It's only available in debug-mode.

Readonly type

Type of the object.

Readonly valid

valid: boolean

Object usability.

returns

False if object is no longer usable.

Methods

addPlayer

  • addPlayer(player: Player): void
  • Parameters

    Returns void

deleteMeta

  • deleteMeta(key: string): void
  • deleteMeta<K>(key: K): void

deleteSyncedMeta

  • deleteSyncedMeta(key: string): void
  • deleteSyncedMeta<K>(key: K): void
  • Removes the specified key and the data connected to that specific key.

    Parameters

    • key: string

      The key of the value to remove.

    Returns void

  • Type parameters

    Parameters

    • key: K

    Returns void

destroy

  • destroy(): void
  • Removes the object from the world.

    Returns void

getMeta

  • getMeta<K>(key: Exclude<K, keyof ICustomVoiceChannelMeta>): unknown
  • getMeta<K>(key: K): ICustomVoiceChannelMeta[K] | undefined
  • getMeta<V>(key: string): V | undefined

getMetaDataKeys

  • getMetaDataKeys(): readonly string[]

getSyncedMeta

  • getSyncedMeta<K>(key: Exclude<K, keyof ICustomBaseObjectSyncedMeta>): unknown
  • getSyncedMeta<K>(key: K): ICustomBaseObjectSyncedMeta[K] | undefined
  • getSyncedMeta<V>(key: string): V | undefined

getSyncedMetaKeys

  • getSyncedMetaKeys(): readonly string[]

hasMeta

  • hasMeta(key: string): boolean
  • hasMeta<K>(key: K): boolean

hasSyncedMeta

  • hasSyncedMeta(key: string): boolean
  • hasSyncedMeta<K>(key: K): boolean
  • Determines whether contains the specified key.

    Parameters

    • key: string

      The key of the value to locate.

    Returns boolean

    True if the meta table contains any data at the specified key or False if not

  • Type parameters

    Parameters

    • key: K

    Returns boolean

isPlayerInChannel

  • isPlayerInChannel(player: Player): boolean
  • Parameters

    Returns boolean

isPlayerMuted

  • isPlayerMuted(player: Player): boolean
  • Parameters

    Returns boolean

mutePlayer

  • mutePlayer(player: Player): void
  • Parameters

    Returns void

removePlayer

  • removePlayer(player: Player): void
  • Parameters

    Returns void

setMeta

  • setMeta<K>(key: K, value: shared.InterfaceValueByKey<ICustomVoiceChannelMeta, K>): void
  • setMeta<K>(key: K, value: ICustomVoiceChannelMeta[K]): void
  • setMeta<V, K>(key: K, value: shared.InterfaceValueByKey<ICustomVoiceChannelMeta, K, V>): void

setSyncedMeta

  • setSyncedMeta<K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K>): void
  • setSyncedMeta<K>(key: K, value: ICustomBaseObjectSyncedMeta[K]): void
  • setSyncedMeta<V, K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K, V>): void

unmutePlayer

  • unmutePlayer(player: Player): void
  • Parameters

    Returns void

Static getByID