Class AxolotlBucketBuilder

java.lang.Object
io.github.lucfr1746.llibrary.itemstack.ItemBuilder
io.github.lucfr1746.llibrary.itemstack.AxolotlBucketBuilder

public class AxolotlBucketBuilder extends ItemBuilder
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 Details

    • AxolotlBucketBuilder

      public AxolotlBucketBuilder(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Constructs an AxolotlBucketBuilder using an existing ItemStack.
      Parameters:
      itemStack - the item stack to modify
      Throws:
      IllegalArgumentException - if the item's meta is not an instance of AxolotlBucketMeta
    • AxolotlBucketBuilder

      public AxolotlBucketBuilder()
      Constructs an AxolotlBucketBuilder with a default AXOLOTL_BUCKET.
  • Method Details

    • getVariant

      @Nullable public org.bukkit.entity.Axolotl.Variant getVariant()
      Retrieves the Axolotl.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

      public AxolotlBucketBuilder setVariant(@NotNull org.bukkit.entity.Axolotl.Variant variant)
      Sets the Axolotl.Variant for the axolotl in the bucket.
      Parameters:
      variant - the axolotl variant to set
      Returns:
      this AxolotlBucketBuilder instance for method chaining