Skip to content
On this page

Athena.systems.inventory.drops

Functions

add

Usage

Athena.systems.inventory.drops.add(item, pos, player?): Promise<string>

Add a dropped item.

Parameters

NameTypeDefault valueDescription
itemStoredItemundefined
posIVector3undefinedA position in the world.
playerPlayerundefined-

Returns

Promise<string>

Defined in

server/systems/inventory/drops.ts:62


get

Usage

Athena.systems.inventory.drops.get(id): player | undefined

Get the current item drop.

Parameters

NameType
idstring

Returns

player | undefined

Defined in

server/systems/inventory/drops.ts:105


isItemAvailable

Usage

Athena.systems.inventory.drops.isItemAvailable(_id): any

Check if an item is available by database id

Parameters

NameType
_idstring

Returns

any

Defined in

server/systems/inventory/drops.ts:159


markForTaken

Usage

Athena.systems.inventory.drops.markForTaken(_id, value): void

Mark an item as being taken

Parameters

NameType
_idstring
valueboolean

Returns

void

Defined in

server/systems/inventory/drops.ts:174


override

Usage

Athena.systems.inventory.drops.override(functionName, callback): any

Used to override inventory drop item functionality

Parameters

NameType
functionName"add"
callback(item: StoredItem, pos: IVector3, player: Player) => Promise<string>

Returns

any

Defined in

server/systems/inventory/drops.ts:188

Usage

Athena.systems.inventory.drops.override(functionName, callback): any

Used to override inventory drop item functionality

Parameters

NameType
functionName"get"
callback(id: string) => player | undefined

Returns

any

Defined in

server/systems/inventory/drops.ts:189

Usage

Athena.systems.inventory.drops.override(functionName, callback): any

Used to override inventory drop item functionality

Parameters

NameType
functionName"sub"
callback(id: string) => Promise<player | undefined>

Returns

any

Defined in

server/systems/inventory/drops.ts:190

Usage

Athena.systems.inventory.drops.override(functionName, callback): any

Used to override inventory drop item functionality

Parameters

NameType
functionName"isItemAvailable"
callback(_id: string) => any

Returns

any

Defined in

server/systems/inventory/drops.ts:191

Usage

Athena.systems.inventory.drops.override(functionName, callback): any

Used to override inventory drop item functionality

Parameters

NameType
functionName"markForTaken"
callback(_id: string, value: boolean) => void

Returns

any

Defined in

server/systems/inventory/drops.ts:192


sub

Usage

Athena.systems.inventory.drops.sub(id): Promise<player | undefined>

Remove the dropped item based on identifier.

Parameters

NameType
idstring

Returns

Promise<player | undefined>

Defined in

server/systems/inventory/drops.ts:118

Created by Stuyk | Est. 2020