Class Minion<T extends Mob>
java.lang.Object
me.gamercoder215.mobchip.bosses.Minion<T>
- Type Parameters:
T- Type of Minion
Represents a Boss Minion
Any methods that will call a class update (i.e. setHealth(double)) will not update the actual entity if spawned. Call updates directly from the entity received at spawn(Location).
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a Minion with a health of 20.Creates a Minion with no equipment or attributes.Creates a Minion with no equipment.Minion(@NotNull Class<T> clazz, double health, @Nullable Map<EquipmentSlot, ItemStack> equipment, @Nullable Map<AttributeInstance, Double> attributes) Creates a Minion. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(@NotNull AttributeInstance inst, double value) Adds an Attribute that this Minion will spawn with.@NotNull Map<AttributeInstance, Double> Fetch this Entity's Attributes.Get the Entity Class of this Minion.@NotNull Map<EquipmentSlot, ItemStack> Fetch the Minion's Equipment.doubleGet the health that this Minion will spawn with.voidremoveAttribute(@NotNull AttributeInstance inst) Removes an Attribute that this Minion will spawn with.voidSets this Minion's Boots.voidsetChestplate(@Nullable ItemStack item) Sets this Minion's Chestplate.voidsetHealth(double health) Sets the health that this Minion will spawn with.voidSets this Minion's Helmet.voidsetItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item) Sets an item on this Minion's Equipment that it will spawn with.voidsetLeggings(@Nullable ItemStack item) Sets this Minion's Leggings.voidsetMainhand(@Nullable ItemStack item) Sets this Minion's Mainhand.voidsetOffhand(@Nullable ItemStack item) Sets this Minion's Offhand.Spawns this Minion at a Boss.Spawns this Minion at a Location.Spawns this Minion at another Boss.
-
Constructor Details
-
Minion
public Minion(@NotNull @NotNull Class<T> clazz, double health, @Nullable @Nullable Map<EquipmentSlot, ItemStack> equipment, @Nullable @Nullable Map<AttributeInstance, Double> attributes) throws IllegalArgumentException Creates a Minion.- Parameters:
clazz- Entity Classhealth- Health of Entityequipment- Entity Equipment Map of EquipmentSlot to ItemStackattributes- Entity Attribute Map of Attribute Instance to Value (Max Health will be automatically applied)- Throws:
IllegalArgumentException- if health is less than 0 or if class is null
-
Minion
public Minion(@NotNull @NotNull Class<T> clazz, double health, @Nullable @Nullable Map<EquipmentSlot, ItemStack> equipment) throws IllegalArgumentException Creates a Minion with no equipment.- Parameters:
clazz- Entity Classhealth- Health of Entityequipment- Entity Equipment Map of EquipmentSlot to ItemStack- Throws:
IllegalArgumentException- if health is less than 0 or if class is null
-
Minion
Creates a Minion with no equipment or attributes.- Parameters:
clazz- Entity Classhealth- Health of Entity- Throws:
IllegalArgumentException- if health is less than 0 or if class is null
-
Minion
Creates a Minion with a health of 20.- Parameters:
clazz- Class of minion- Throws:
IllegalArgumentException- if health less than 0 or if class is null
-
-
Method Details
-
getEntityClass
-
spawn
-
spawn
-
spawn
-
getAttributes
Fetch this Entity's Attributes.- Returns:
- Entity Attributes
-
getHealth
public double getHealth()Get the health that this Minion will spawn with.- Returns:
- Health
-
setHealth
public void setHealth(double health) Sets the health that this Minion will spawn with.- Parameters:
health- Health to spawn with
-
addAttribute
Adds an Attribute that this Minion will spawn with.- Parameters:
inst- Attribute Instancevalue- Value to set
-
removeAttribute
Removes an Attribute that this Minion will spawn with.- Parameters:
inst- Attribute Instance
-
getEquipment
Fetch the Minion's Equipment.- Returns:
- Equipment that the Minion will spawn with
-
setItem
Sets an item on this Minion's Equipment that it will spawn with.- Parameters:
slot- EquipmentSlot to spawnitem- ItemStack to set, can be null
-
setHelmet
Sets this Minion's Helmet.- Parameters:
item- Helmet Item to set, can be null
-
setChestplate
Sets this Minion's Chestplate.- Parameters:
item- Chestplate Item to set, can be null
-
setLeggings
Sets this Minion's Leggings.- Parameters:
item- Leggings Item to set, can be null
-
setBoots
Sets this Minion's Boots.- Parameters:
item- Boots Item to set, can be null
-
setMainhand
Sets this Minion's Mainhand.- Parameters:
item- Mainhand Item to change, can be null
-
setOffhand
Sets this Minion's Offhand.- Parameters:
item- Offhand Item to change, can be null
-