Class ItemStackCreator
java.lang.Object
studio.magemonkey.genesis.managers.item.ItemStackCreator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackcreateItemStack(List<String> itemData, boolean finalVersion) org.bukkit.inventory.ItemStackcreateItemStack(List<String> itemData, GenesisBuy buy, GenesisShop shop, boolean finalVersion) voidgiveItem(org.bukkit.entity.Player p, GenesisBuy buy, org.bukkit.inventory.ItemStack i, boolean cloneItem) Gives the selected item to the player.voidgiveItem(org.bukkit.entity.Player p, GenesisBuy buy, org.bukkit.inventory.ItemStack i, int amount, boolean cloneItem) Gives the selected item to the player.
-
Constructor Details
-
ItemStackCreator
public ItemStackCreator()
-
-
Method Details
-
createItemStack
public org.bukkit.inventory.ItemStack createItemStack(List<String> itemData, GenesisBuy buy, GenesisShop shop, boolean finalVersion) -
createItemStack
-
giveItem
public void giveItem(org.bukkit.entity.Player p, GenesisBuy buy, org.bukkit.inventory.ItemStack i, boolean cloneItem) Gives the selected item to the player.- Parameters:
p- Player to give the item to.buy- Shopitem linked to the item.i- Item to add to the player.cloneItem- Whether the item selected can be modified or if a clone of the selected item should be used instead, keeping the original item unchanged.- API Note:
- If cloneItem = false the item is modified (placeholders adapted to player and amount changed).
-
giveItem
public void giveItem(org.bukkit.entity.Player p, GenesisBuy buy, org.bukkit.inventory.ItemStack i, int amount, boolean cloneItem) Gives the selected item to the player.- Parameters:
p- Player to give the item to.buy- Shopitem linked to the item.i- Item to add to the player.amount- Amount of the item to add to the player.cloneItem- Whether the item selected can be modified or if a clone of the selected item should be used instead, keeping the original item unchanged.- API Note:
- If cloneItem = false the item is modified (placeholders adapted to player and amount changed).
-