程序包 org.bukkit.inventory.meta

# 接口 SpawnEggMeta

所有超级接口:
  `Cloneable`, `ConfigurationSerializable`, `ItemMeta`, `PersistentDataHolder`

public interface SpawnEggMeta extends ItemMeta
代表刷怪蛋和它刷出的实体的类型.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull SpawnEggMeta`
  `clone()`
  `@Nullable EntitySnapshot`
  `getSpawnedEntity()`
  Gets the `EntitySnapshot` that will be spawned by this spawn egg or null if no entity has been set.
  `EntityType`
  `getSpawnedType()`
  已过时。
  不同实体类型对应不同的刷怪蛋物品
  `void`
  `setSpawnedEntity(@NotNull EntitySnapshot snapshot)`
  Sets the `EntitySnapshot` that will be spawned by this spawn egg.
  `void`
  `setSpawnedType(EntityType type)`
  已过时。
  不同实体类型对应不同的刷怪蛋物品

  ### 从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable

  `serialize`

  ### 从接口继承的方法 org.bukkit.inventory.meta.ItemMeta

  `addAttributeModifier, addEnchant, addItemFlags, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getMaxStackSize, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setMaxStackSize, setRarity, setTool, setUnbreakable, setVersion`

  ### 从接口继承的方法 org.bukkit.persistence.PersistentDataHolder

  `getPersistentDataContainer`

- ## 方法详细资料

  - ### getSpawnedType

    @Deprecated @Contract("-> fail") EntityType getSpawnedType()
    已过时。
    不同实体类型对应不同的刷怪蛋物品
    获取刷怪蛋生成的实体的类型.

    原文: Get the type of entity this egg will spawn.

    返回:
      实体类型. 根据实现指定的默认值, 可能为 null

  - ### setSpawnedType

    @Deprecated @Contract("_ -> fail") void setSpawnedType(EntityType type)
    已过时。
    不同实体类型对应不同的刷怪蛋物品
    设置刷怪蛋生成的实体的类型.

    原文: Set the type of entity this egg will spawn.

    参数:
      `type` - 实体类型. 根据实现指定的默认值, 可能为 null

  - ### getSpawnedEntity

    @Nullable @Nullable EntitySnapshot getSpawnedEntity()
    Gets the `EntitySnapshot` that will be spawned by this spawn egg or null if no entity has been set.

    All applicable data from the egg will be copied, such as custom name, health, and velocity.

    返回:
      the entity snapshot or null if no entity has been set

  - ### setSpawnedEntity

    void setSpawnedEntity(@NotNull @NotNull EntitySnapshot snapshot)
    Sets the `EntitySnapshot` that will be spawned by this spawn egg.

    All applicable data from the entity will be copied, such as custom name, health, and velocity.

    参数:
      `snapshot` - the snapshot

  - ### clone

    @NotNull @NotNull SpawnEggMeta clone()
    指定者:
      `clone` 在接口中 `ItemMeta`