Class Extensions
A collection of API methods.
Inheritance
Inherited Members
Namespace: Exiled.CustomRoles.API
Assembly: Exiled.CustomRoles.dll
Syntax
public static class Extensions
Methods
| Improve this Doc View SourceGetActiveAbilities(Player)
Gets all ActiveAbilitys a specific Player is able to use.
Declaration
public static IEnumerable<ActiveAbility> GetActiveAbilities(this Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to get abilities for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ActiveAbility> | A System.Collections.Generic.IEnumerable<T> of their active abilities, or null if none. |
GetCustomRoles(Player)
Gets a System.Collections.ObjectModel.ReadOnlyCollection<T> of the player's current custom roles.
Declaration
public static ReadOnlyCollection<CustomRole> GetCustomRoles(this Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to check for roles. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<CustomRole> | A System.Collections.ObjectModel.ReadOnlyCollection<T> of all current custom roles. |
GetSelectedAbility(Player)
Gets the Player's selected ability.
Declaration
public static ActiveAbility GetSelectedAbility(this Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to check. |
Returns
Type | Description |
---|---|
ActiveAbility | The ActiveAbility the Player has selected, or null. |
Register(CustomAbility)
Registers a CustomAbility.
Declaration
public static void Register(this CustomAbility ability)
Parameters
Type | Name | Description |
---|---|---|
CustomAbility | ability | The CustomAbility to be registered. |
Register(CustomRole)
Registers a CustomRole.
Declaration
public static void Register(this CustomRole role)
Parameters
Type | Name | Description |
---|---|---|
CustomRole | role | CustomRole to be registered. |
Register(IEnumerable<CustomRole>)
Registers an System.Collections.Generic.IEnumerable<T> of CustomRoles.
Declaration
public static void Register(this IEnumerable<CustomRole> customRoles)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CustomRole> | customRoles | CustomRoles to be registered. |
Unregister(CustomAbility)
Unregisters a CustomAbility.
Declaration
public static void Unregister(this CustomAbility ability)
Parameters
Type | Name | Description |
---|---|---|
CustomAbility | ability | The CustomAbility to be unregistered. |
Unregister(CustomRole)
Unregisters a CustomRole.
Declaration
public static void Unregister(this CustomRole role)
Parameters
Type | Name | Description |
---|---|---|
CustomRole | role | CustomRole to be unregistered. |
Unregister(IEnumerable<CustomRole>)
Unregisters an System.Collections.Generic.IEnumerable<T> of CustomRoles.
Declaration
public static void Unregister(this IEnumerable<CustomRole> customRoles)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CustomRole> | customRoles | CustomRoles to be unregistered. |