Class Extensions
A collection of API methods.
Inheritance
System.Object
Extensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Exiled.CustomItems.API
Assembly: Exiled.CustomItems.dll
Syntax
public static class Extensions
Methods
| Improve this Doc View SourceRegister(CustomItem)
Registers a CustomItem.
Declaration
public static void Register(this CustomItem item)
Parameters
Type | Name | Description |
---|---|---|
CustomItem | item | The CustomItem to be registered. |
Register(IEnumerable<CustomItem>)
Registers an System.Collections.Generic.IEnumerable<T> of CustomItems.
Declaration
public static void Register(this IEnumerable<CustomItem> customItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CustomItem> | customItems | CustomItems to be registered. |
ResetInventory(Player, IEnumerable<String>, Boolean)
Resets the player's inventory to the provided list of items and/or customitems names, clearing any items it already possess.
Declaration
public static void ResetInventory(this Player player, IEnumerable<string> newItems, bool displayMessage = false)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The player to which items will be given. |
System.Collections.Generic.IEnumerable<System.String> | newItems | The new items that have to be added to the inventory. |
System.Boolean | displayMessage | Indicates a value whether ShowPickedUpMessage(Player) will be called when the player receives the CustomItem or not. |
Unregister(CustomItem)
Unregisters a CustomItem.
Declaration
public static void Unregister(this CustomItem item)
Parameters
Type | Name | Description |
---|---|---|
CustomItem | item | The CustomItem to be unregistered. |
Unregister(IEnumerable<CustomItem>)
Unregisters an System.Collections.Generic.IEnumerable<T> of CustomItems.
Declaration
public static void Unregister(this IEnumerable<CustomItem> customItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CustomItem> | customItems | CustomItems to be unregistered. |