Package org.bukkit.inventory.meta
Interface SpawnEggMeta
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
,PersistentDataHolder
Represents a spawn egg and it's spawned type.
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Gets theEntitySnapshot
that will be spawned by this spawn egg or null if no entity has been set.Deprecated.different types are different itemsvoid
setSpawnedEntity
(EntitySnapshot snapshot) Sets theEntitySnapshot
that will be spawned by this spawn egg.void
setSpawnedType
(EntityType type) Deprecated.different types are different itemsMethods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
Methods inherited from interface 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
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Method Details
-
getSpawnedType
Deprecated.different types are different itemsGet the type of entity this egg will spawn.- Returns:
- The entity type. May be null for implementation specific default.
-
setSpawnedType
Deprecated.different types are different itemsSet the type of entity this egg will spawn.- Parameters:
type
- The entity type. May be null for implementation specific default.
-
getSpawnedEntity
Gets theEntitySnapshot
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.
- Returns:
- the entity snapshot or null if no entity has been set
-
setSpawnedEntity
Sets theEntitySnapshot
that will be spawned by this spawn egg.
All applicable data from the entity will be copied, such as custom name, health, and velocity.
- Parameters:
snapshot
- the snapshot
-
clone
-