PointValidator: ((points, emitEvent) => boolean)

Type of point validator, implement and register to PointPlugin to create custom validation.

Type declaration

    • (points, emitEvent): boolean
    • Parameters

      • points: {
            in?: Point;
            out?: Point;
        }

        The points that are attempted to be added.

      • emitEvent: (<T>(event) => void)

        Callback to trigger custom event on plugin. For instance if validation failed.

          • <T>(event): void
          • Type Parameters

            • T extends PlayerEvent

            Parameters

            • event: T

            Returns void

      Returns boolean

Returns

True if points is allowed, false otherwise.