Skip to main content

AccessPlayerInterface

The tie for AccessPlayerBase, so anything holding a player can ask about their access without requiring the access package or plumbing a ServiceBag to the call site.

local accessPlayer = AccessPlayerInterface:Find(player)
if accessPlayer and not accessPlayer:IsFeatureAllowedByName("owns-game") then
	return
end

Members are name-based for the same reason AccessDataServiceInterface's are: a consumer that already holds an AccessFeature object also holds this package. The setters sit behind TieDefinition.Realms.SERVER, so a client cannot see them at all.

Show raw api
{
    "functions": [],
    "properties": [],
    "types": [],
    "name": "AccessPlayerInterface",
    "desc": "The tie for [AccessPlayerBase], so anything holding a player can ask about their access without\nrequiring the access package or plumbing a [ServiceBag] to the call site.\n\n```lua\nlocal accessPlayer = AccessPlayerInterface:Find(player)\nif accessPlayer and not accessPlayer:IsFeatureAllowedByName(\"owns-game\") then\n\treturn\nend\n```\n\nMembers are name-based for the same reason [AccessDataServiceInterface]'s are: a consumer that already\nholds an [AccessFeature] object also holds this package. The setters sit behind\n[TieDefinition.Realms].SERVER, so a client cannot see them at all.",
    "source": {
        "line": 19,
        "path": "src/access/src/Shared/AccessPlayerInterface.lua"
    }
}