Skip to main content

onceServer

Callable

  • onceServer<K>(eventName: K, listener: (...args: Parameters<ICustomServerClientEvent[K]>) => void): void
  • onceServer<K>(eventName: Exclude<K, never>, listener: (...args: any[]) => void): void
  • onceServer(listener: (eventName: string, ...args: any[]) => void): void

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


    Type parameters

    • K: never