⭐
StarAPI Documentation
  • ⭐API Information
    • ❔About Our API's
    • ⬇️Installing Our API
  • 🌟StarAPI (Spigot/Paper)
    • 📂Abilities
      • ⏳Transmition
      • 🤯Implosion
      • 🏹MultiShot
    • 📂Builders
      • 👕Armor Builder
      • 📊Bossbar Builder
      • ☄️Command Builder
      • ⚔️Item Builder
      • 🧟‍♂️Mob Builder
      • 💯Scoreboard Builder
      • 🔗Webhook Builder
      • 🔨Message Builder
      • 🏗️Actionbar Builder
    • 📂Files
      • 📃Create Files
      • 📁Create Folders
      • 📖Read Files
      • 🖊️Write Files
    • 📂Inventory Utilities
      • 💎Animated Items
      • 📖Book Content
      • 📔Book GUI
      • 🎞️Filler
      • 🪁Inventory Items
      • 📝Inventory Name
      • 💀Inventory Skulls
    • 📂Message Utilities
      • 🤖Auto Responses
      • 🎨Message Colors
    • 📂Recipes
      • ⚒️Crafting Recipes
      • 🧑‍🍳Furnace Recipes
    • 📂Timers
      • 🕙Active Timers
      • ❌Cancel Timers
      • 🕙Delayed Timers
      • 🕐Create Timers
    • 📂Misc
      • 💀Give Skulls
      • 📈Progress Bars
      • ⬛Block Placer
Powered by GitBook
On this page
  • Overview
  • Constructor
  • Static Factory Method
  • Methods
  • Notes
  1. StarAPI (Spigot/Paper)
  2. Builders

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

private MobBuilder()

Creates a new instance of the MobBuilder class.

Static Factory Method

create

public static MobBuilder create()

Creates a new MobBuilder instance.

Methods

type

public MobBuilder type(EntityType type)

Sets the type of the mob.

location

public MobBuilder location(Location location)

Sets the location where the mob will be spawned.

customName

public MobBuilder customName(String customName)

Sets the custom name of the mob.

health

public MobBuilder health(double health)

Sets the health of the mob.

armorContents

public MobBuilder armorContents(Material... materials)

Sets the armor contents of the mob.

heldItem

public MobBuilder heldItem(Material material)

Sets the held item of the mob.

showParticles

public MobBuilder showParticles(boolean showParticles)

Sets whether particle effects are shown for potion effects.

potionEffect

public MobBuilder potionEffect(PotionEffectType type, int durationSeconds, int amplifier)

Adds a potion effect to the mob.

isBaby

public MobBuilder isBaby(boolean isBaby)

Sets whether the mob is a baby.

spawn

public LivingEntity spawn()

Spawns the configured mob at the specified location and returns the living entity.

Notes

  • The MobBuilder class 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.

PreviousItem BuilderNextScoreboard Builder

Last updated 1 year ago

🌟
📂
🧟‍♂️