Class TropicalFishBucketBuilder
java.lang.Object
io.github.lucfr1746.llibrary.itemstack.ItemBuilder
io.github.lucfr1746.llibrary.itemstack.TropicalFishBucketBuilder
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 Summary
ConstructorsConstructorDescriptionTropicalFishBucketBuilder(int amount) Constructs aTropicalFishBucketBuilderwith a new Tropical Fish Bucket item.TropicalFishBucketBuilder(@NotNull org.bukkit.inventory.ItemStack itemStack) Constructs aTropicalFishBucketBuilderusing an existingItemStack. -
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.DyeColorGets the body color of the tropical fish in the bucket.org.bukkit.entity.TropicalFish.PatternGets the pattern of the tropical fish in the bucket.@Nullable org.bukkit.DyeColorGets the pattern color of the tropical fish in the bucket.booleanChecks if the bucket contains a specific tropical fish variant.setBodyColor(@NotNull org.bukkit.DyeColor color) Sets the body color of the tropical fish in the bucket.setPattern(org.bukkit.entity.TropicalFish.Pattern pattern) Sets the pattern of the tropical fish in the bucket.setPatternColor(@NotNull org.bukkit.DyeColor color) Sets the pattern color of the tropical fish 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
-
TropicalFishBucketBuilder
public TropicalFishBucketBuilder(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) Constructs aTropicalFishBucketBuilderusing an existingItemStack.- Parameters:
itemStack- The item stack to modify.- Throws:
IllegalArgumentException- If the item is not a Tropical Fish Bucket.
-
TropicalFishBucketBuilder
public TropicalFishBucketBuilder(int amount) Constructs aTropicalFishBucketBuilderwith a new Tropical Fish Bucket item.- Parameters:
amount- The quantity of buckets in the stack.
-
-
Method Details
-
setBodyColor
Sets the body color of the tropical fish in the bucket.- Parameters:
color- The body color of the fish.- Returns:
- This
TropicalFishBucketBuilderinstance 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
TropicalFishBucketBuilderinstance 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
Sets the pattern color of the tropical fish in the bucket.- Parameters:
color- The pattern color of the fish.- Returns:
- This
TropicalFishBucketBuilderinstance 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.
-