Class NetworkConnectedClientList

Class to work with definite couple of clients, bound by certain conditions.

Constructors

Methods

  • Sends packet to all clients from the following list.

    Parameters

    • packetName: string

      name of the packet to send

    • packetData: object

      packet data object

    Returns void

  • Sets up policy to add players from the same given dimension to the list.

    Parameters

    • dimensionID: number

      numeric ID of the dimension where the clients have to be located to be included into the list

    • updateRate: number

      how many milliseconds will have to pass between list updates

    Returns NetworkConnectedClientList

    Reference to itself to be used in sequential calls.

  • Sets up policy to add players from the same given dimension to the list.

    Parameters

    • dimensionID: number

      numeric ID of the dimension where the clients have to be located to be included into the list

    Returns NetworkConnectedClientList

    Reference to itself to be used in sequential calls.

  • Condition to bound clients to the list. All clients in a given dimension at a distance of no more than maxDistance from x, y, z.

    Parameters

    • x: number

      X coord of the conditional centre point of the area where clients are located

    • y: number

      Y coord of the conditional centre point of the area where clients are located

    • z: number

      Z coord of the conditional centre point of the area where clients are located

    • dimensionID: number

      numeric ID of the dimension where clients are located

    • maxDistance: number

      max distance from the client to the conditional centre, to bound the client to the list

    Returns NetworkConnectedClientList

    Reference to itself to be used in sequential calls.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.