Class OminousBottleBuilder
java.lang.Object
io.github.lucfr1746.llibrary.itemstack.ItemBuilder
io.github.lucfr1746.llibrary.itemstack.OminousBottleBuilder
The
OminousBottleBuilder
class extends ItemBuilder
to provide
additional functionality for modifying OminousBottleMeta
of an ItemStack
.
This class allows setting and checking the amplifier for an Ominous Bottle's bad omen effect.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs anOminousBottleBuilder
with a newMaterial.OMINOUS_BOTTLE
.OminousBottleBuilder
(@NotNull org.bukkit.inventory.ItemStack itemStack) Constructs anOminousBottleBuilder
using an existingItemStack
. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the amplifier level of the Ominous Bottle's bad omen effect.boolean
Checks if the Ominous Bottle has an amplifier set.setAmplifier
(int amplifier) Sets the amplifier level for the Ominous Bottle's bad omen effect.Methods inherited from class io.github.lucfr1746.llibrary.itemstack.ItemBuilder
addAttributeModifier, addEnchant, addEnchant, addEnchant, addItemFlags, addLore, build, getAmount, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getDamageResistant, getDisplayName, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippableComponent, getFoodComponent, getItemFlags, getItemMeta, getItemModel, getJukeboxPlayableComponent, getMaxStackSize, getRarity, getToolComponent, getTooltipStyle, getTranslationKey, getType, getUseCooldownComponent, getUseRemainder, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDamageResistant, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippableComponent, hasFoodComponent, hasItemFlag, hasItemModel, hasJukeboxPlayableComponent, hasMaxStackSize, hasRarity, hasToolComponent, hasTooltipStyle, hasUseCooldownComponent, hasUseRemainder, hideAllItemFlags, insertLore, isGlider, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchants, removeItemFlags, replaceLore, setAmount, setAttributeModifiers, setCustomModelData, setDamageResistant, setDisplayName, setEnchantable, setEnchantmentGlintOverride, setEquippableComponent, setEquippableComponent, setFood, setFoodComponent, setGlider, setHideTooltip, setItemModel, setItemModel, setJukeboxPlayableComponent, setJukeboxPlayableComponent, setJukeboxPlayableComponent, setLores, setLores, setMaxStackSize, setRarity, setToolComponent, setToolComponent, setTooltipStyle, setTooltipStyle, setType, setUnbreakable, setUseCooldownComponent, setUseCooldownComponent, setUseCooldownComponent, setUseRemainder
-
Constructor Details
-
OminousBottleBuilder
public OminousBottleBuilder()Constructs anOminousBottleBuilder
with a newMaterial.OMINOUS_BOTTLE
. -
OminousBottleBuilder
public OminousBottleBuilder(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) Constructs anOminousBottleBuilder
using an existingItemStack
.- Parameters:
itemStack
- the item stack to modify- Throws:
IllegalArgumentException
- if the item's meta is not an instance ofOminousBottleMeta
-
-
Method Details
-
setAmplifier
Sets the amplifier level for the Ominous Bottle's bad omen effect.- Parameters:
amplifier
- the amplifier level to set (must be >= 0)- Returns:
- this
OminousBottleBuilder
instance for chaining - Throws:
IllegalArgumentException
- if amplifier is negative
-
getAmplifier
public int getAmplifier()Gets the amplifier level of the Ominous Bottle's bad omen effect.- Returns:
- the amplifier level
-
hasAmplifier
public boolean hasAmplifier()Checks if the Ominous Bottle has an amplifier set.- Returns:
- true if an amplifier is set, false otherwise
-