Class AxolotlBucketBuilder
java.lang.Object
io.github.lucfr1746.llibrary.itemstack.ItemBuilder
io.github.lucfr1746.llibrary.itemstack.AxolotlBucketBuilder
The
AxolotlBucketBuilder
class extends ItemBuilder
to provide
additional functionality for modifying AxolotlBucketMeta
of an ItemStack
.
This class allows setting and retrieving axolotl variants for axolotl buckets.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs anAxolotlBucketBuilder
with a default AXOLOTL_BUCKET.AxolotlBucketBuilder
(@NotNull org.bukkit.inventory.ItemStack itemStack) Constructs anAxolotlBucketBuilder
using an existingItemStack
. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.Axolotl.Variant
Retrieves theAxolotl.Variant
of the axolotl in the bucket.boolean
Checks whether the axolotl bucket has a variant set.setVariant
(org.bukkit.entity.Axolotl.Variant variant) Sets theAxolotl.Variant
for the axolotl in the bucket.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
-
AxolotlBucketBuilder
public AxolotlBucketBuilder(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) Constructs anAxolotlBucketBuilder
using an existingItemStack
.- Parameters:
itemStack
- the item stack to modify- Throws:
IllegalArgumentException
- if the item's meta is not an instance ofAxolotlBucketMeta
-
AxolotlBucketBuilder
public AxolotlBucketBuilder()Constructs anAxolotlBucketBuilder
with a default AXOLOTL_BUCKET.
-
-
Method Details
-
getVariant
@Nullable public org.bukkit.entity.Axolotl.Variant getVariant()Retrieves theAxolotl.Variant
of the axolotl in the bucket.- Returns:
- the axolotl variant, or
null
if none is set
-
hasVariant
public boolean hasVariant()Checks whether the axolotl bucket has a variant set.- Returns:
true
if a variant is set,false
otherwise
-
setVariant
Sets theAxolotl.Variant
for the axolotl in the bucket.- Parameters:
variant
- the axolotl variant to set- Returns:
- this
AxolotlBucketBuilder
instance for method chaining
-