Hierarchy (View Summary)

Constructors

Properties

name: string = 'Network'

The name of this plugin.

Methods

  • Gets the index of a packet.

    Parameters

    • pPacketName: string

      The name of the packet.

    Returns undefined | number

  • Register a listener for a packet.

    Type Parameters

    • T extends unknown[]

    Parameters

    • pPacketName: string

      The name of the packet that will be listened to.

    • pListener: NetworkListener<T>

      The listener that will be called when the packet is received.

    Returns void

  • API for receiving data from the server.

    Parameters

    • pClient: Client

      The client involved with this packet.

    • pPacketName: string | number

      The name of the packet that was sent.

    • pData: unknown[] = []

      The data that was sent.

    • OptionalpVerbose: boolean

      If the plugin should log packets.

    Returns void

  • Register the packets registry.

    Parameters

    • pPackets: readonly string[]

      An array of strings that represent the packet names.

    Returns void