-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathItemStack.java
More file actions
50 lines (43 loc) · 1.65 KB
/
ItemStack.java
File metadata and controls
50 lines (43 loc) · 1.65 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* WolfyUtilities, APIs and Utilities for Minecraft Spigot plugins
* Copyright (C) 2021 WolfyScript
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.wolfyscript.utilities.common.adapters;
import com.wolfyscript.utilities.NamespacedKey;
import com.wolfyscript.utilities.common.items.ItemStackConfig;
public interface ItemStack {
/**
* The id representing the item of this ItemStack.<br>
* Usually e.g. <pre>minecraft:<item_id></pre>
*
* @return The id of the item.
*/
NamespacedKey getItem();
/**
* The stack amount of this ItemStack.
*
* @return The stack amount.
*/
int getAmount();
/**
* Creates a snapshot of the whole ItemStack including the full NBT.<br>
* <b>This can be quite resource heavy!</b><br>
* The snapshot can be simply written to json using the Json mapper of WolfyUtils.
*
* @return The snapshot ItemStack config of this ItemStack.
*/
ItemStackConfig<?> snapshot();
}