Package org.bukkit.material
Class SpawnEgg
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.SpawnEgg
- All Implemented Interfaces:
java.lang.Cloneable
public class SpawnEgg extends MaterialData
Represents a spawn egg that can be used to spawn mobs
-
Constructor Summary
Constructors Constructor Description SpawnEgg()
SpawnEgg(byte data)
Deprecated.Magic valueSpawnEgg(int type, byte data)
Deprecated.Magic valueSpawnEgg(EntityType type)
-
Method Summary
Modifier and Type Method Description SpawnEgg
clone()
EntityType
getSpawnedType()
Get the type of entity this egg will spawn.void
setSpawnedType(EntityType type)
Set the type of entity this egg will spawn.java.lang.String
toString()
Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
Method Details
-
getSpawnedType
Get the type of entity this egg will spawn.- Returns:
- The entity type.
-
setSpawnedType
Set the type of entity this egg will spawn.- Parameters:
type
- The entity type.
-
toString
public java.lang.String toString()- Overrides:
toString
in classMaterialData
-
clone
- Overrides:
clone
in classMaterialData
-