Package org.bukkit.inventory.meta
Interface SpawnEggMeta
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
,PersistentDataHolder
,PersistentDataViewHolder
Represents a spawn egg and it's spawned type.
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Get the custom type of entity this egg will spawn.Gets theEntitySnapshot
that will be spawned by this spawn egg or null if no entity has been set.Deprecated, for removal: This API element is subject to removal in a future version.different types are different itemsvoid
Set the custom type of entity this egg will spawn.void
setSpawnedEntity
(@NotNull EntitySnapshot snapshot) Sets theEntitySnapshot
that will be spawned by this spawn egg.void
setSpawnedType
(EntityType type) Deprecated, for removal: This API element is subject to removal in a future version.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, displayName, displayName, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDamageResistant, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getLoreComponents, getMaxStackSize, getPlaceableKeys, getRarity, getTool, getTooltipStyle, getUseCooldown, getUseRemainder, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDamageResistant, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippable, hasFood, hasItemFlag, hasItemModel, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasPlaceableKeys, hasRarity, hasTool, hasTooltipStyle, hasUseCooldown, hasUseRemainder, isFireResistant, isGlider, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDamageResistant, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setLoreComponents, setMaxStackSize, setPlaceableKeys, setRarity, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseRemainder, setVersion
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Method Details
-
getSpawnedType
Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.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
-
getCustomSpawnedType
Get the custom type of entity this egg will spawn.- Returns:
- the entity type or null if no custom type is set
-
setCustomSpawnedType
Set the custom type of entity this egg will spawn.- Parameters:
type
- the entity type or null to clear the custom type
-
clone
-