Skip to main content

onceClient

Callable

  • onceClient<K>(eventName: K, listener: (player: Player, ...args: Parameters<ICustomClientServerEvent[K]>) => void): void
  • onceClient<K>(eventName: Exclude<K, never>, listener: (player: Player, ...args: any[]) => void): void
  • onceClient(listener: (eventName: string, player: Player, ...args: any[]) => void): void

  • Subscribes to a client event with the specified listener, which only triggers once.


    Type parameters

    • K: never