Athena.systems.inventory.drops ​
Functions ​
add ​
Usage
Athena.systems.inventory.drops.add(item
, pos
, player?
): Promise
<string
>
Add a dropped item.
Parameters ​
Name | Type | Default value | Description |
---|---|---|---|
item | StoredItem | undefined | |
pos | IVector3 | undefined | A position in the world. |
player | Player | undefined | - |
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 ​
Name | Type |
---|---|
id | string |
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 ​
Name | Type |
---|---|
_id | string |
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 ​
Name | Type |
---|---|
_id | string |
value | boolean |
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
id | string |
Returns ​
Promise
<player
| undefined
>