👕Armor Builder
Created armor sets that are dye'd or not.
Overview
The ArmorBuilder class facilitates the construction of custom armor pieces in a Minecraft Bukkit server environment. This builder pattern allows for the creation of armor with specified attributes, enchantments, colors, and more, providing flexibility in armor customization for players and developers alike.
Constructor
ArmorBuilder
ArmorBuilderpublic ArmorBuilder(Material armorType)Initializes a new instance of the ArmorBuilder class with the specified armor type.
Parameters
armorType: The material type of the armor piece to be constructed.
Methods
displayName
displayNamepublic ArmorBuilder displayName(String displayName)Sets the display name for the armor piece being constructed.
lore
lorepublic ArmorBuilder lore(String... lore)Sets the lore for the armor piece being constructed.
amount
amountSets the amount of the armor piece being constructed.
enchant
enchantEnchants the armor piece being constructed with the specified enchantment and level.
attribute
attributeSets an attribute modifier for the armor piece being constructed.
flags
flagsSets item flags for the armor piece being constructed.
leatherColor
leatherColorSets the leather color for leather armor pieces being constructed.
build
buildBuilds and returns the constructed armor piece.
Notes
The
ArmorBuilderclass allows for the creation of custom armor pieces with various attributes and properties.Each method in the builder pattern modifies the attributes of the armor piece being constructed.
Developers can utilize this class to provide players with customized armor options tailored to their preferences and gameplay needs.
Last updated