Skip to main content

SettingsServiceClient

This item only works when running on the client. Client

Provides access to settings on the client. See SettingDefinition which should register settings on the server. See SettingsService for server component.

Functions

Init

SettingsServiceClient:Init(serviceBagServiceBag) → ()

Initializes the setting service. Should be done via ServiceBag.

GetLocalPlayerSettings

SettingsServiceClient:GetLocalPlayerSettings() → PlayerSettingsClient | nil

Gets the local player settings

ObserveLocalPlayerSettingsBrio

SettingsServiceClient:ObserveLocalPlayerSettingsBrio() → Observable<Brio<PlayerSettingsClient>>

Observes the local player settings in a brio

ObserveLocalPlayerSettings

SettingsServiceClient:ObserveLocalPlayerSettings() → Observable<PlayerSettingsClient | nil>

Observes the local player settings

PromiseLocalPlayerSettings

SettingsServiceClient:PromiseLocalPlayerSettings(cancelTokenCancellationToken) → Promise<PlayerSettingsClient>

Promises the local player settings

ObservePlayerSettings

SettingsServiceClient:ObservePlayerSettings(playerPlayer) → Observable<PlayerSettingsClient | nil>

Observes the player settings

ObservePlayerSettingsBrio

SettingsServiceClient:ObservePlayerSettingsBrio(playerPlayer) → Observable<Brio<PlayerSettingsClient>>

Observes the player settings in a brio

GetPlayerSettings

SettingsServiceClient:GetPlayerSettings(playerPlayer) → PlayerSettingsClient | nil

Gets a player's settings

PromisePlayerSettings

SettingsServiceClient:PromisePlayerSettings(
playerPlayer,
cancelTokenCancellationToken
) → Promise<PlayerSettingsClient>

Promises the player's settings

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes the setting service. Should be done via ServiceBag.",
            "params": [
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 23,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "GetLocalPlayerSettings",
            "desc": "Gets the local player settings",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "PlayerSettingsClient | nil"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 46,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "ObserveLocalPlayerSettingsBrio",
            "desc": "Observes the local player settings in a brio",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<PlayerSettingsClient>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 55,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "ObserveLocalPlayerSettings",
            "desc": "Observes the local player settings",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<PlayerSettingsClient | nil>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 64,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "PromiseLocalPlayerSettings",
            "desc": "Promises the local player settings",
            "params": [
                {
                    "name": "cancelToken",
                    "desc": "",
                    "lua_type": "CancellationToken"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<PlayerSettingsClient>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 74,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "ObservePlayerSettings",
            "desc": "Observes the player settings",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<PlayerSettingsClient | nil>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 84,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "ObservePlayerSettingsBrio",
            "desc": "Observes the player settings in a brio",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<PlayerSettingsClient>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 96,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "GetPlayerSettings",
            "desc": "Gets a player's settings",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "PlayerSettingsClient | nil"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 108,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        },
        {
            "name": "PromisePlayerSettings",
            "desc": "Promises the player's settings",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "cancelToken",
                    "desc": "",
                    "lua_type": "CancellationToken"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<PlayerSettingsClient>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 121,
                "path": "src/settings/src/Client/SettingsServiceClient.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "SettingsServiceClient",
    "desc": "Provides access to settings on the client. See [SettingDefinition] which should\nregister settings on the server. See [SettingsService] for server component.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 8,
        "path": "src/settings/src/Client/SettingsServiceClient.lua"
    }
}