Table of Contents

Class CustomKeycard

Namespace
Exiled.CustomItems.API.Features
Assembly
Exiled.CustomItems.dll

The Custom keycard base class.

public abstract class CustomKeycard : CustomItem
Inheritance
CustomKeycard
Inherited Members
Extension Methods

Properties

Permissions

Gets or sets the permissions for custom keycard.

public virtual KeycardPermissions Permissions { get; set; }

Property Value

KeycardPermissions

Type

Gets or sets the ItemType to use for this item.

public override ItemType Type { get; set; }

Property Value

ItemType

Exceptions

ArgumentOutOfRangeException

Throws if specified ItemType is not Keycard.

Methods

Give(Player, Item, bool)

Gives an Item as a CustomItem to a Player.

public override void Give(Player player, Item item, bool displayMessage = true)

Parameters

player Player

The Player who will receive the item.

item Item

The Item to be given.

displayMessage bool

Indicates whether ShowPickedUpMessage(Player) will be called when the player receives the item.

OnInteractingDoor(Player, Door)

Called when custom keycard interacts with a door.

protected virtual void OnInteractingDoor(Player player, Door door)

Parameters

player Player

Owner of Custom keycard.

door Door

Door with which interacting.

OnInteractingLocker(Player, Chamber)

Called when custom keycard interacts with a locker.

protected virtual void OnInteractingLocker(Player player, Chamber chamber)

Parameters

player Player

Owner of Custom keycard.

chamber Chamber

Chamber with which interacting.

Spawn(Vector3, Item, Player?)

Spawns the CustomItem in a specific position.

public override Pickup? Spawn(Vector3 position, Item item, Player? previousOwner = null)

Parameters

position Vector3

The UnityEngine.Vector3 where the CustomItem will be spawned.

item Item

The Item to be spawned as a CustomItem.

previousOwner Player

The PreviousOwner of the item. Can be null.

Returns

Pickup

The Pickup of the spawned CustomItem.

SubscribeEvents()

Called after the manager is initialized, to allow loading of special event handlers.

protected override void SubscribeEvents()

UnsubscribeEvents()

Called when the manager is being destroyed, to allow unloading of special event handlers.

protected override void UnsubscribeEvents()