API Reference › Permissions
IPermissionManager
InterfaceNamespace: SwiftlyS2.Shared.Permissions · Assembly: SwiftlyS2.CS2.dll
public interface IPermissionManagerMethods
Adds a permission to a player.
void AddPermission(ulong steamId, string permission)Adds a sub-permission to a permission.
void AddSubPermission(string permission, string subPermission)Clears all permissions from a player (both base and temporary).
[Obsolete("Use ClearPermissions instead.")]
void ClearPermission(ulong steamId)Parameters
- steamIdulongThe Steam ID of the player.
Clears all permissions from a player (both base and temporary).
void ClearPermissions(ulong steamId)Parameters
- steamIdulongThe Steam ID of the player.
Gets all permissions of a player, including inherited permissions from sub-permissions.
IEnumerable<string> GetPlayerPermissions(ulong steamId)Parameters
- steamIdulongThe Steam ID of the player.
Returns
Checks if a player has a permission. Support 'xxx.*' for wildcard permissions.
bool PlayerHasPermission(ulong steamId, string permission)Checks if a player has all permissions in the list. Support 'xxx.*' for wildcard permissions.
bool PlayerHasPermissions(ulong steamId, IEnumerable<string> permissions)Parameters
- steamIdulongThe Steam ID of the player.
- permissionsIEnumerable<string>The list of permissions to check.
Removes a permission from a player.
void RemovePermission(ulong steamId, string permission)