🧟♂️Mob Builder
Create bosses and mobs with ease
Overview
The MobBuilder class simplifies the creation and customization of mobs (entities) in a Minecraft Bukkit server environment. It provides methods for specifying the mob's type, location, custom name, health, armor, held item, potion effects, and other attributes, allowing for flexible and convenient mob generation.
Constructor
MobBuilder
MobBuilderprivate MobBuilder()Creates a new instance of the MobBuilder class.
Static Factory Method
create
createpublic static MobBuilder create()Creates a new MobBuilder instance.
Methods
type
typepublic MobBuilder type(EntityType type)Sets the type of the mob.
location
locationSets the location where the mob will be spawned.
customName
customNameSets the custom name of the mob.
health
healthSets the health of the mob.
armorContents
armorContentsSets the armor contents of the mob.
heldItem
heldItemSets the held item of the mob.
showParticles
showParticlesSets whether particle effects are shown for potion effects.
potionEffect
potionEffectAdds a potion effect to the mob.
isBaby
isBabySets whether the mob is a baby.
spawn
spawnSpawns the configured mob at the specified location and returns the living entity.
Notes
The
MobBuilderclass provides a convenient way to create and customize mobs with various attributes and properties.Developers can easily specify the mob's type, location, custom name, health, armor, held item, potion effects, and more using the provided methods.
Custom mobs created using this builder pattern can enhance gameplay by adding unique and tailored entities to the game world.
Last updated