Package org.bukkit.entity
Interface EntitySnapshot
public interface EntitySnapshot
Represents an immutable copy of an entity's state. Can be used at any time to
create an instance of the stored entity.
-
Method Summary
Modifier and TypeMethodDescriptioncreateEntity
(Location to) Creates an entity using this template and spawns it at the provided location.createEntity
(World world) Creates an entity using this template.Get this EntitySnapshot as an NBT string.Gets the type of entity this template holds.
-
Method Details
-
createEntity
Creates an entity using this template. Does not spawn the copy in the world.- Parameters:
world
- the world to create the entity in- Returns:
- a copy of this entity.
-
createEntity
Creates an entity using this template and spawns it at the provided location.- Parameters:
to
- the location to copy to- Returns:
- the new entity.
-
getEntityType
Gets the type of entity this template holds.- Returns:
- the type
-
getAsString
Get this EntitySnapshot as an NBT string.This string should not be relied upon as a serializable value.
- Returns:
- the NBT string
-