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 theItemStack
inslot
is a valid item.org.bukkit.inventory.meta.ItemMeta
Get theItemMeta
retrieved fromsource
.org.bukkit.inventory.ItemStack
Get theItemStack
retrieved fromsource
.void
setItemMeta
(org.bukkit.inventory.meta.ItemMeta itemMeta) Appropriately update theItemMeta
ofsource
.
-
Constructor Details
-
ItemSource
-
-
Method Details
-
fromSlot
Checks if theItemStack
inslot
is a valid item.- Parameters:
slot
- TheSlot
to check.- Returns:
ItemSource
if the item is valid, otherwisenull
.
-
getSource
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack()Get theItemStack
retrieved fromsource
. -
getItemMeta
public org.bukkit.inventory.meta.ItemMeta getItemMeta()Get theItemMeta
retrieved fromsource
. -
setItemMeta
public void setItemMeta(org.bukkit.inventory.meta.ItemMeta itemMeta) Appropriately update theItemMeta
ofsource
.- Parameters:
itemMeta
- TheItemMeta
to updatesource
-