Table of Contents

Class Usable

Namespace
Exiled.API.Features.Items
Assembly
Exiled.API.dll

A wrapper class for InventorySystem.Items.Usables.UsableItem.

public class Usable : Item, IWrapper<ItemBase>, IWrapper<UsableItem>
Inheritance
Usable
Implements
IWrapper<ItemBase>
IWrapper<UsableItem>
Derived
Inherited Members
Extension Methods

Constructors

Usable(UsableItem)

Initializes a new instance of the Usable class.

public Usable(UsableItem itemBase)

Parameters

itemBase UsableItem

The base InventorySystem.Items.Usables.UsableItem class.

Properties

Base

Gets the InventorySystem.Items.Usables.UsableItem that this class is encapsulating.

public UsableItem Base { get; }

Property Value

UsableItem

Equippable

Gets a value indicating whether this item is equippable.

public bool Equippable { get; }

Property Value

bool

Holsterable

Gets a value indicating whether this item is holsterable.

public bool Holsterable { get; }

Property Value

bool

IsUsing

Gets a value indicating whether the item is currently being used.

public bool IsUsing { get; }

Property Value

bool

MaxCancellableTime

Gets or sets how long after using starts a player has to cancel using the item.

public float MaxCancellableTime { get; set; }

Property Value

float

PlayerGetCooldown

Gets all the cooldown between uses of this item.

public float PlayerGetCooldown { get; }

Property Value

float

RemainingCooldown

Gets or sets the cooldown between repeated uses of this item.

public float RemainingCooldown { get; set; }

Property Value

float

UseTime

Gets or sets how long it takes to use the item.

public float UseTime { get; set; }

Property Value

float

Weight

Gets or sets the weight of the item.

public float Weight { get; set; }

Property Value

float

Methods

CreatePickup(Vector3, Quaternion?, bool)

Creates the Pickup that based on this Item.

public override Pickup CreatePickup(Vector3 position, Quaternion? rotation = null, bool spawn = true)

Parameters

position Vector3

The location to spawn the item.

rotation Quaternion?

The rotation of the item.

spawn bool

Whether the Pickup should be initially spawned.

Returns

Pickup

The created Pickup.

Use()

Uses the item.

public virtual void Use()

Use(Player)

Uses the item.

public virtual void Use(Player owner = null)

Parameters

owner Player

Target Player to use an Usable.