Skip to main content
Branch: Release Candidate

onClient

Callable

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

  • Subscribes to a client event with the specified listener.


    Type parameters

    • K: never