Package ch.njol.skript.util
Class ItemSource<T>
java.lang.Object
ch.njol.skript.util.ItemSource<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ItemSource<Slot> Checks if theItemStackinslotis a valid item.org.bukkit.inventory.meta.ItemMetaGet theItemMetaretrieved fromsource.org.bukkit.inventory.ItemStackGet theItemStackretrieved fromsource.voidsetItemMeta(org.bukkit.inventory.meta.ItemMeta itemMeta) Appropriately update theItemMetaofsource.
-
Constructor Details
-
ItemSource
-
-
Method Details
-
fromSlot
Checks if theItemStackinslotis a valid item.- Parameters:
slot- TheSlotto check.- Returns:
ItemSourceif the item is valid, otherwisenull.
-
getSource
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack()Get theItemStackretrieved fromsource. -
getItemMeta
public org.bukkit.inventory.meta.ItemMeta getItemMeta()Get theItemMetaretrieved fromsource. -
setItemMeta
public void setItemMeta(org.bukkit.inventory.meta.ItemMeta itemMeta) Appropriately update theItemMetaofsource.- Parameters:
itemMeta- TheItemMetato updatesource
-