public interface StackedEntity extends AsyncStackedObject<org.bukkit.entity.LivingEntity>, UpgradeableStackedObject
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCustomName()
Get the custom name of the living-entity.
|
int |
getDefaultUnstack()
Gets the default unstack amount for this entity.
|
java.util.List<org.bukkit.inventory.ItemStack> |
getDrops(int lootBonusLevel)
Get the drops of this entity with a specific fortune level.
|
java.util.List<org.bukkit.inventory.ItemStack> |
getDrops(int lootBonusLevel,
int stackAmount)
Get the drops of this entity with a specific fortune level and a stack size.
|
int |
getExp(int stackAmount,
int defaultExp)
Get the exp of this entity with a stack size.
|
double |
getHealth()
Get the health of the living-entity.
|
org.bukkit.entity.LivingEntity |
getLivingEntity()
Get the living-entity object of bukkit.
|
SpawnCause |
getSpawnCause()
Returns the spawn cause of this entity
|
org.bukkit.entity.EntityType |
getType()
Get the entity-type of the living-entity.
|
java.util.UUID |
getUniqueId()
Get the uuid of the living-entity.
|
boolean |
hasNameTag()
Checks if entity has a name tag.
|
boolean |
isCustomNameVisible()
Check whether or not the name of the living entity is visible.
|
boolean |
isInstantKill(org.bukkit.event.entity.EntityDamageEvent.DamageCause damageCause)
Checks if the entity should be instant-killed or not.
|
boolean |
isNameBlacklisted()
Checks if the name of the entity is blacklisted.
|
boolean |
isNerfed()
Checks if the entity is nerfed or not.
|
void |
runSpawnerStackAsync(StackedSpawner stackedSpawner,
java.util.function.Consumer<java.util.Optional<org.bukkit.entity.LivingEntity>> result)
Try to stack the living-entity the same as if it was spawned by a spawner.
|
void |
setCustomName(java.lang.String customName)
Set a custom-name to the living-entity.
|
void |
setCustomNameVisible(boolean visible)
Set visible custom name flag to the living-entity.
|
void |
setDrops(java.util.List<org.bukkit.inventory.ItemStack> itemStacks)
Set a temporary loot-table for this entity.
|
void |
setDropsMultiplier(int multiplier)
Set a multiplier for loot.
|
void |
setHealth(double health)
Set the health to the living-entity.
|
void |
setLootMultiplier(int multiplier)
Deprecated.
See setDropsMultiplier
|
void |
setNerfed(boolean nerfed)
Set whether the entity should be nerfed or not.
|
void |
setSpawnCause(SpawnCause spawnCause)
Set the spawn cause of the entity.
|
void |
setTempLootTable(java.util.List<org.bukkit.inventory.ItemStack> itemStacks)
Deprecated.
see setDrops
|
void |
spawnCorpse()
Spawn a corpse for this entity.
|
StackedEntity |
spawnDuplicate(int amount)
Spawn a duplicate entity with a specific stack amount.
|
org.bukkit.entity.LivingEntity |
trySpawnerStack(StackedSpawner stackedSpawner)
Deprecated.
Should not be used. See runSpawnerStackAsync
|
void |
updateNerfed()
Set whether the entity should be nerfed or not using the isNerfed flag.
|
runStackAsync, runStackAsync
canStackInto, getLocation, getMergeRadius, getStackAmount, getStackLimit, getWorld, isBlacklisted, isCached, isSimilar, isWhitelisted, isWorldDisabled, remove, runStack, runStack, runStackCheck, runUnstack, runUnstack, setStackAmount, spawnStackParticle, tryStack, tryStackInto, tryUnstack, updateName
getUpgrade, setUpgrade
org.bukkit.entity.LivingEntity getLivingEntity()
java.util.UUID getUniqueId()
org.bukkit.entity.EntityType getType()
void setHealth(double health)
health
- new health to setdouble getHealth()
java.lang.String getCustomName()
void setCustomName(java.lang.String customName)
customName
- a new custom nameboolean isCustomNameVisible()
void setCustomNameVisible(boolean visible)
visible
- should the custom name of the living-entity be visible or notvoid runSpawnerStackAsync(StackedSpawner stackedSpawner, java.util.function.Consumer<java.util.Optional<org.bukkit.entity.LivingEntity>> result)
stackedSpawner
- The spawner that spawned the entity.result
- The entity that this entity was stacked into.@Deprecated org.bukkit.entity.LivingEntity trySpawnerStack(StackedSpawner stackedSpawner)
stackedSpawner
- the spawnerStackedEntity spawnDuplicate(int amount)
amount
- the stack amount it will havevoid spawnCorpse()
java.util.List<org.bukkit.inventory.ItemStack> getDrops(int lootBonusLevel)
lootBonusLevel
- the fortune leveljava.util.List<org.bukkit.inventory.ItemStack> getDrops(int lootBonusLevel, int stackAmount)
lootBonusLevel
- the fortune levelstackAmount
- the stack sizevoid setDrops(java.util.List<org.bukkit.inventory.ItemStack> itemStacks)
itemStacks
- The loot to set@Deprecated void setTempLootTable(java.util.List<org.bukkit.inventory.ItemStack> itemStacks)
itemStacks
- The loot to setvoid setDropsMultiplier(int multiplier)
multiplier
- The multiplier@Deprecated void setLootMultiplier(int multiplier)
multiplier
- The multiplierint getExp(int stackAmount, int defaultExp)
stackAmount
- the stack sizedefaultExp
- the default exp to return if not foundSpawnCause getSpawnCause()
void setSpawnCause(SpawnCause spawnCause)
spawnCause
- The spawn causeboolean isNerfed()
void setNerfed(boolean nerfed)
void updateNerfed()
boolean isNameBlacklisted()
boolean isInstantKill(org.bukkit.event.entity.EntityDamageEvent.DamageCause damageCause)
damageCause
- The damage to check (can be null)int getDefaultUnstack()
boolean hasNameTag()