Package wtf.choco.alchema.util
Class ItemUtil
java.lang.Object
wtf.choco.alchema.util.ItemUtil
public final class ItemUtil
extends java.lang.Object
A series of utilities pertaining to
ItemStacks
.- Author:
- Parker Hawke - Choco
-
Method Summary
Modifier and Type Method Description static @NotNull org.bukkit.inventory.ItemStack
deserializeItemStack(@NotNull com.google.gson.JsonObject object)
Deserialize anItemStack
from aJsonObject
.static @NotNull com.google.gson.JsonObject
serializeItemStack(@NotNull org.bukkit.inventory.ItemStack item)
Serialize anItemStack
to aJsonObject
.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
serializeItemStack
@NotNull public static @NotNull com.google.gson.JsonObject serializeItemStack(@NotNull @NotNull org.bukkit.inventory.ItemStack item)Serialize anItemStack
to aJsonObject
.- Parameters:
item
- the item to serialize- Returns:
- the object into which the item was serialized
-
deserializeItemStack
@NotNull public static @NotNull org.bukkit.inventory.ItemStack deserializeItemStack(@NotNull @NotNull com.google.gson.JsonObject object)Deserialize anItemStack
from aJsonObject
.- Parameters:
object
- the object from which to deserialize an ItemStack- Returns:
- the deserialized ItemStack
-