Package com.saicone.rtag.entity
Class EntityObject
java.lang.Object
com.saicone.rtag.entity.EntityObject
Class to invoke Entity methods across versions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
Get provided Minecraft Entity as Bukkit Entity.static Object
Get provided Bukkit Entity as Minecraft Entity.static boolean
isCraftEntity
(Object object) Check if the provided object is instance of CraftEntity.static boolean
isMinecraftEntity
(Object object) Check if the provided object is instance of Minecraft Entity.static void
Load NBTTagCompound into entity.static Object
Save current NBTTagCompound into new one entity.
-
Method Details
-
isMinecraftEntity
Check if the provided object is instance of Minecraft Entity.- Parameters:
object
- the object to check.- Returns:
- true if the object is an instance of Minecraft Entity.
-
isCraftEntity
Check if the provided object is instance of CraftEntity.- Parameters:
object
- the object to check.- Returns:
- true if the object is an instance of CraftEntity.
-
getEntity
Get provided Minecraft Entity as Bukkit Entity.- Parameters:
entity
- Entity to convert.- Returns:
- A Bukkit Entity.
- Throws:
IllegalArgumentException
- if entity is not a Minecraft Entity.
-
getHandle
Get provided Bukkit Entity as Minecraft Entity.- Parameters:
entity
- Entity to convert.- Returns:
- A Minecraft Entity.
-
save
Save current NBTTagCompound into new one entity.- Parameters:
entity
- Entity instance.- Returns:
- A NBTTagCompound that represent the tile.
-
load
Load NBTTagCompound into entity.- Parameters:
entity
- Entity instance.tag
- The NBTTagCompound to load.
-