@rbxts/fletchette
    Preparing search index...

    Class ExactMapPropertyPacket<K, V>

    ExactMapPropertyPacket synchronizes a map using diff-based updates, where update checks are based on exact equality of values.

    Type Parameters

    • K
    • V

    Hierarchy (View Summary)

    Index

    Constructors

    • Type Parameters

      • K
      • V

      Parameters

      • id: string
      • OptionalinitialEntries: ReadonlyMap<K, V>
      • OptionalisUnreliable: boolean
      • Optionalmeta: Many<
            [
                "tuple",
                [
                    payload: [
                        "object_raw",
                        (
                            | ["full", ["boolean"]]
                            | [
                                "changes",
                                [
                                    "array",
                                    ((...) extends (...) ? (...) : (...)) extends true
                                        ? [(...), (...), (...), (...)]
                                        : [(...), (...)],
                                ],
                            ]
                        )[],
                    ],
                ],
                undefined,
            ],
        >

      Returns ExactMapPropertyPacket<K, V>

    Properties

    className: "ExactMapPropertyPacket"

    Class name of the packet, used for debugging purposes.

    signalPacket: SignalPacket<(payload: DiffPayload<K, V>) => void>

    Methods

    • Clears the value of the property for players that pass the predicate. Should only be used on the server.

      Parameters

      • predicate: (player: Player) => boolean

        The predicate to filter players

      Returns void

    • Retrieves the entire map. If a player is provided, retrieves the map specific to that player if it exists.

      Parameters

      • Optionalplayer: Player

        The player for whom to retrieve the map, or undefined for the global map.

      Returns Map<K, V>

    • Returns the value of the property for a specific player. Should only be used on the server.

      Parameters

      • player: Player

        The player to get the value for

      Returns Map<K, V>

      The value of the property for the player

      Use get instead.

    • Sets the value of the property for players that pass the predicate. Should only be used on the server.

      Parameters

      • predicate: (player: Player) => boolean

        The predicate to filter players

      • value: Map

        The new value of the property

      Returns void

    • Sets the value of the property for a list of players. Should only be used on the server.

      Parameters

      • players: Player[]

        The list of players to set the value for

      • value: Map

        The new value of the property

      Returns void