-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPlayerInventory.kt
More file actions
33 lines (28 loc) · 856 Bytes
/
PlayerInventory.kt
File metadata and controls
33 lines (28 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package ru.endlesscode.mimic.inventory
import org.jetbrains.annotations.ApiStatus
import ru.endlesscode.mimic.ExperimentalMimicApi
/**
* API to access player's inventory.
* Use [items], [equippedItems] or [storedItems] to get items from inventory.
* @since 0.8.0
*/
@ExperimentalMimicApi
@ApiStatus.Experimental
public interface PlayerInventory<ItemStackT : Any> {
/**
* Returns list containing all items from the inventory.
* Items may not be null.
*/
public val items: List<ItemStackT>
get() = equippedItems + storedItems
/**
* Returns list containing all equipped items.
* Items may not be null.
*/
public val equippedItems: List<ItemStackT>
/**
* Returns list containing all not equipped items.
* Items may not be null.
*/
public val storedItems: List<ItemStackT>
}