Class TropicalFishBucketBuilder

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

public class TropicalFishBucketBuilder extends ItemBuilder
The TropicalFishBucketBuilder class extends ItemBuilder to provide additional functionality for modifying TropicalFishBucketMeta of an ItemStack. This includes setting the body color, pattern, and pattern color of the tropical fish.
  • Constructor Details

    • TropicalFishBucketBuilder

      public TropicalFishBucketBuilder(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Constructs a TropicalFishBucketBuilder using an existing ItemStack.
      Parameters:
      itemStack - The item stack to modify.
      Throws:
      IllegalArgumentException - If the item is not a Tropical Fish Bucket.
    • TropicalFishBucketBuilder

      public TropicalFishBucketBuilder(int amount)
      Constructs a TropicalFishBucketBuilder with a new Tropical Fish Bucket item.
      Parameters:
      amount - The quantity of buckets in the stack.
  • Method Details

    • setBodyColor

      public TropicalFishBucketBuilder setBodyColor(@NotNull @NotNull org.bukkit.DyeColor color)
      Sets the body color of the tropical fish in the bucket.
      Parameters:
      color - The body color of the fish.
      Returns:
      This TropicalFishBucketBuilder instance for chaining.
    • getBodyColor

      @Nullable public @Nullable org.bukkit.DyeColor getBodyColor()
      Gets the body color of the tropical fish in the bucket.
      Returns:
      The body color of the fish, or null if not set.
    • setPattern

      public TropicalFishBucketBuilder setPattern(@NotNull org.bukkit.entity.TropicalFish.Pattern pattern)
      Sets the pattern of the tropical fish in the bucket.
      Parameters:
      pattern - The fish pattern.
      Returns:
      This TropicalFishBucketBuilder instance for chaining.
    • getPattern

      @Nullable public org.bukkit.entity.TropicalFish.Pattern getPattern()
      Gets the pattern of the tropical fish in the bucket.
      Returns:
      The fish pattern, or null if not set.
    • setPatternColor

      public TropicalFishBucketBuilder setPatternColor(@NotNull @NotNull org.bukkit.DyeColor color)
      Sets the pattern color of the tropical fish in the bucket.
      Parameters:
      color - The pattern color of the fish.
      Returns:
      This TropicalFishBucketBuilder instance for chaining.
    • getPatternColor

      @Nullable public @Nullable org.bukkit.DyeColor getPatternColor()
      Gets the pattern color of the tropical fish in the bucket.
      Returns:
      The pattern color of the fish, or null if not set.
    • hasVariant

      public boolean hasVariant()
      Checks if the bucket contains a specific tropical fish variant.
      Returns:
      True if a variant is set, false otherwise.