程序包 org.bukkit.entity

# 接口 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.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull Entity`
  `createEntity(@NotNull Location to)`
  Creates an entity using this template and spawns it at the provided location.
  `@NotNull Entity`
  `createEntity(@NotNull World world)`
  Creates an entity using this template.
  `@NotNull String`
  `getAsString()`
  Get this EntitySnapshot as an NBT string.
  `@NotNull EntityType`
  `getEntityType()`
  Gets the type of entity this template holds.

- ## 方法详细资料

  - ### createEntity

    @NotNull @NotNull Entity createEntity(@NotNull @NotNull World world)
    Creates an entity using this template. Does not spawn the copy in the world.
    参数:
      `world` - the world to create the entity in
    返回:
      a copy of this entity.

  - ### createEntity

    @NotNull @NotNull Entity createEntity(@NotNull @NotNull Location to)
    Creates an entity using this template and spawns it at the provided location.
    参数:
      `to` - the location to copy to
    返回:
      the new entity.

  - ### getEntityType

    @NotNull @NotNull EntityType getEntityType()
    Gets the type of entity this template holds.
    返回:
      the type

  - ### getAsString

    @NotNull @Experimental @NotNull String getAsString()
    Get this EntitySnapshot as an NBT string.

    This string should not be relied upon as a serializable value.

    返回:
      the NBT string