Package dev.triumphteam.gui.builder.item
Class ItemBuilder
java.lang.Object
dev.triumphteam.gui.builder.item.BaseItemBuilder<ItemBuilder>
dev.triumphteam.gui.builder.item.ItemBuilder
public class ItemBuilder extends BaseItemBuilder<ItemBuilder>
Main ItemBuilder
-
Method Summary
Modifier and Type Method Description ItemBuilder
addEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment)
Deprecated.In favor ofBaseItemBuilder.enchant(Enchantment)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
addEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment, int level)
Deprecated.In favor ofBaseItemBuilder.enchant(Enchantment, int)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
addEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment, int level, boolean ignoreLevelRestriction)
Deprecated.In favor ofBaseItemBuilder.enchant(Enchantment, int, boolean)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
addItemFlags(@NotNull org.bukkit.inventory.ItemFlag... flags)
Deprecated.In favor ofBaseItemBuilder.flags(ItemFlag...)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
addLore(@NotNull java.lang.String... lore)
Deprecated.In favor ofBaseItemBuilder.lore(Consumer)
, will be removed in 3.0.1ItemBuilder
addLore(@NotNull java.util.List<java.lang.String> lore)
Deprecated.In favor ofBaseItemBuilder.lore(Consumer)
, will be removed in 3.0.1static ItemBuilder
from(@NotNull org.bukkit.inventory.ItemStack itemStack)
Main method to createItemBuilder
static ItemBuilder
from(@NotNull org.bukkit.Material material)
Alternative method to createItemBuilder
ItemBuilder
removeEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment)
Deprecated.In favor ofBaseItemBuilder.disenchant(Enchantment)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
setAmount(int amount)
Deprecated.In favor ofBaseItemBuilder.amount(int)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
setLore(@NotNull java.lang.String... lore)
Deprecated.In favor ofBaseItemBuilder.lore(Component...)
, will be removed in 3.0.1ItemBuilder
setLore(@NotNull java.util.List<java.lang.String> lore)
Deprecated.In favor ofBaseItemBuilder.lore(List)
, will be removed in 3.0.1ItemBuilder
setName(@NotNull java.lang.String name)
Deprecated.In favor ofBaseItemBuilder.name(Component)
, will be removed in 3.0.1ItemBuilder
setSkullOwner(@NotNull org.bukkit.OfflinePlayer player)
Deprecated.In favor ofSkullBuilder.owner(OfflinePlayer)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
setSkullTexture(@NotNull java.lang.String texture)
Deprecated.In favor ofSkullBuilder.texture(String)
, nothing changed just the name, will be removed in 3.0.1ItemBuilder
setUnbreakable(boolean unbreakable)
Deprecated.In favor ofBaseItemBuilder.unbreakable()
, nothing changed just the name, will be removed in 3.0.1static SkullBuilder
skull()
Method for creating aSkullBuilder
which will have PLAYER_HEAD specific methodsstatic SkullBuilder
skull(@NotNull org.bukkit.inventory.ItemStack itemStack)
Method for creating aSkullBuilder
which will have PLAYER_HEAD specific methods
-
Method Details
-
from
Main method to createItemBuilder
- Parameters:
itemStack
- TheItemStack
you want to edit- Returns:
- A new
ItemBuilder
-
from
Alternative method to createItemBuilder
- Parameters:
material
- TheMaterial
you want to create an item from- Returns:
- A new
ItemBuilder
-
skull
Method for creating aSkullBuilder
which will have PLAYER_HEAD specific methods- Returns:
- A new
SkullBuilder
-
skull
Method for creating aSkullBuilder
which will have PLAYER_HEAD specific methods- Parameters:
itemStack
- An existing PLAYER_HEADItemStack
- Returns:
- A new
SkullBuilder
-
setName
Deprecated.In favor ofBaseItemBuilder.name(Component)
, will be removed in 3.0.1Set display name of the item- Parameters:
name
- the display name of the item- Returns:
ItemBuilder
-
setAmount
Deprecated.In favor ofBaseItemBuilder.amount(int)
, nothing changed just the name, will be removed in 3.0.1Sets the amount of items- Parameters:
amount
- the amount of items- Returns:
ItemBuilder
-
addLore
Deprecated.In favor ofBaseItemBuilder.lore(Consumer)
, will be removed in 3.0.1Add lore lines of an item- Parameters:
lore
- the lore lines to add- Returns:
ItemBuilder
-
addLore
Deprecated.In favor ofBaseItemBuilder.lore(Consumer)
, will be removed in 3.0.1Set lore lines of an item- Parameters:
lore
- AList
with the lore lines to add- Returns:
ItemBuilder
-
setLore
Deprecated.In favor ofBaseItemBuilder.lore(Component...)
, will be removed in 3.0.1Set the lore lines of an item- Parameters:
lore
- the lore lines to set- Returns:
ItemBuilder
-
setLore
Deprecated.In favor ofBaseItemBuilder.lore(List)
, will be removed in 3.0.1Set the lore lines of an item- Parameters:
lore
- AList
with the lore lines- Returns:
ItemBuilder
-
addEnchantment
@Deprecated public ItemBuilder addEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment, int level, boolean ignoreLevelRestriction)Deprecated.In favor ofBaseItemBuilder.enchant(Enchantment, int, boolean)
, nothing changed just the name, will be removed in 3.0.1Add enchantment to an item- Parameters:
enchantment
- theEnchantment
to addlevel
- the level of theEnchantment
ignoreLevelRestriction
- If should or not ignore it- Returns:
ItemBuilder
-
addEnchantment
@Deprecated public ItemBuilder addEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment, int level)Deprecated.In favor ofBaseItemBuilder.enchant(Enchantment, int)
, nothing changed just the name, will be removed in 3.0.1Add enchantment to an item- Parameters:
enchantment
- theEnchantment
to addlevel
- the level of theEnchantment
- Returns:
ItemBuilder
-
addEnchantment
@Deprecated public ItemBuilder addEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment)Deprecated.In favor ofBaseItemBuilder.enchant(Enchantment)
, nothing changed just the name, will be removed in 3.0.1Add enchantment to an item- Parameters:
enchantment
- theEnchantment
to add- Returns:
ItemBuilder
-
removeEnchantment
@Deprecated public ItemBuilder removeEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment)Deprecated.In favor ofBaseItemBuilder.disenchant(Enchantment)
, nothing changed just the name, will be removed in 3.0.1Removes a certainEnchantment
from the item- Parameters:
enchantment
- TheEnchantment
to remove- Returns:
ItemBuilder
-
addItemFlags
@Deprecated public ItemBuilder addItemFlags(@NotNull @NotNull org.bukkit.inventory.ItemFlag... flags)Deprecated.In favor ofBaseItemBuilder.flags(ItemFlag...)
, nothing changed just the name, will be removed in 3.0.1Add a customItemFlag
to the item- Parameters:
flags
- theItemFlag
to add- Returns:
ItemBuilder
-
setUnbreakable
Deprecated.In favor ofBaseItemBuilder.unbreakable()
, nothing changed just the name, will be removed in 3.0.1Sets the item as unbreakable- Parameters:
unbreakable
- If should or not be unbreakable- Returns:
ItemBuilder
-
setSkullTexture
Deprecated.In favor ofSkullBuilder.texture(String)
, nothing changed just the name, will be removed in 3.0.1Sets the skull texture- Parameters:
texture
- The base64 texture- Returns:
ItemBuilder
-
setSkullOwner
Deprecated.In favor ofSkullBuilder.owner(OfflinePlayer)
, nothing changed just the name, will be removed in 3.0.1Sets skull owner via bukkit methods- Parameters:
player
-OfflinePlayer
to set skull of- Returns:
ItemBuilder
-