Class EntityUtils
java.lang.Object
ch.njol.skript.bukkitutil.EntityUtils
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetAge(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Get the age of an ageable entity.static booleanisAdult(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Quick method to check if entity is an adult.static booleanisAgeable(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Check if an entity is ageable.static voidsetAdult(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Quick method for making an entity an adult.static voidsetAge(org.bukkit.entity.Entity entity, int age) Deprecated, for removal: This API element is subject to removal in a future version.Set the age of an entity.static voidsetBaby(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Quick method for making an entity a baby.static org.bukkit.entity.EntityTypetoBukkitEntityType(EntityData<?> entityData) Deprecated, for removal: This API element is subject to removal in a future version.Convert from Skript's EntityData to Bukkit's EntityTypestatic @Nullable org.bukkit.entity.EntityTypetoBukkitEntityType(Class<? extends org.bukkit.entity.Entity> entityClass) Deprecated, for removal: This API element is subject to removal in a future version.static EntityData<?> toSkriptEntityData(org.bukkit.entity.EntityType entityType) Deprecated, for removal: This API element is subject to removal in a future version.Convert from Bukkit's EntityType to Skript's EntityData
-
Constructor Details
-
EntityUtils
public EntityUtils()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
isAgeable
public static boolean isAgeable(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Check if an entity is ageable. Some entities, such as zombies, do not have an age but can be a baby/adult.- Parameters:
entity- Entity to check- Returns:
- True if entity is ageable
-
getAge
public static int getAge(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Get the age of an ageable entity. Entities such as zombies do not have an age, this will return -1 if baby, 0 if adult.- Parameters:
entity- Entity to grab age for- Returns:
- Age of entity (if zombie/piglin/zoglin -1 = baby, 0 = adult) (if not ageable, will return 0)
-
setAge
public static void setAge(org.bukkit.entity.Entity entity, int age) Deprecated, for removal: This API element is subject to removal in a future version.Set the age of an entity. Entities such as zombies do not have an age, setting below 0 will make them a baby otherwise adult.- Parameters:
entity- Entity to set age forage- Age to set
-
setBaby
public static void setBaby(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Quick method for making an entity a baby. Ageable entities (such as sheep or pigs) will set their default baby age to -24000.- Parameters:
entity- Entity to make baby
-
setAdult
public static void setAdult(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Quick method for making an entity an adult.- Parameters:
entity- Entity to make adult
-
isAdult
public static boolean isAdult(org.bukkit.entity.Entity entity) Deprecated, for removal: This API element is subject to removal in a future version.Quick method to check if entity is an adult.- Parameters:
entity- Entity to check- Returns:
- True if entity is an adult
-
toBukkitEntityType
Deprecated, for removal: This API element is subject to removal in a future version.Convert from Skript's EntityData to Bukkit's EntityType- Parameters:
entityData- Skript's EntityData- Returns:
- Bukkit's EntityType
-
toBukkitEntityType
@Nullable public static @Nullable org.bukkit.entity.EntityType toBukkitEntityType(Class<? extends org.bukkit.entity.Entity> entityClass) Deprecated, for removal: This API element is subject to removal in a future version.Attempts to get anEntityTypefrom aClassextendingEntity. Ensures at least oneEntityTypecan represent an entity class throughClass.isAssignableFrom(Class).- Parameters:
entityClass- TheClassextendingEntity- Returns:
- The exact or assignable
EntityTypeornull
-
toSkriptEntityData
Deprecated, for removal: This API element is subject to removal in a future version.Convert from Bukkit's EntityType to Skript's EntityData- Parameters:
entityType- Bukkit's EntityType- Returns:
- Skript's EntityData
-
EntityUtilsinstead.