Table of Contents

Class Extensions

Namespace
Exiled.CustomRoles.API
Assembly
Exiled.CustomRoles.dll

A collection of API methods.

public static class Extensions
Inheritance
Extensions
Inherited Members

Methods

GetActiveAbilities(Player)

Gets all ActiveAbilitys a specific Player is able to use.

public static IEnumerable<ActiveAbility>? GetActiveAbilities(this Player player)

Parameters

player Player

The Player to get abilities for.

Returns

IEnumerable<ActiveAbility>

A IEnumerable<T> of their active abilities, or null if none.

GetCustomRoles(Player)

Gets a ReadOnlyCollection<T> of the player's current custom roles.

public static ReadOnlyCollection<CustomRole> GetCustomRoles(this Player player)

Parameters

player Player

The Player to check for roles.

Returns

ReadOnlyCollection<CustomRole>

A ReadOnlyCollection<T> of all current custom roles.

GetSelectedAbility(Player)

Gets the Player's selected ability.

public static ActiveAbility? GetSelectedAbility(this Player player)

Parameters

player Player

The Player to check.

Returns

ActiveAbility

The ActiveAbility the Player has selected, or null.

Register(CustomAbility)

Registers a CustomAbility.

public static void Register(this CustomAbility ability)

Parameters

ability CustomAbility

The CustomAbility to be registered.

Register(CustomRole)

Registers a CustomRole.

public static void Register(this CustomRole role)

Parameters

role CustomRole

CustomRole to be registered.

Register(IEnumerable<CustomRole>)

Registers an IEnumerable<T> of CustomRoles.

public static void Register(this IEnumerable<CustomRole> customRoles)

Parameters

customRoles IEnumerable<CustomRole>

CustomRoles to be registered.

Unregister(CustomAbility)

Unregisters a CustomAbility.

public static void Unregister(this CustomAbility ability)

Parameters

ability CustomAbility

The CustomAbility to be unregistered.

Unregister(CustomRole)

Unregisters a CustomRole.

public static void Unregister(this CustomRole role)

Parameters

role CustomRole

CustomRole to be unregistered.

Unregister(IEnumerable<CustomRole>)

Unregisters an IEnumerable<T> of CustomRoles.

public static void Unregister(this IEnumerable<CustomRole> customRoles)

Parameters

customRoles IEnumerable<CustomRole>

CustomRoles to be unregistered.