mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
SPIGOT-1592: Deprecate SpawnEgg spawnedType methods since they cannot be fixed in their current state.
This commit is contained in:
parent
3d25f07885
commit
aa1347ae6a
1 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,7 @@ package org.bukkit.material;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a spawn egg that can be used to spawn mobs
|
* Represents a spawn egg that can be used to spawn mobs
|
||||||
|
@ -40,7 +41,9 @@ public class SpawnEgg extends MaterialData {
|
||||||
* Get the type of entity this egg will spawn.
|
* Get the type of entity this egg will spawn.
|
||||||
*
|
*
|
||||||
* @return The entity type.
|
* @return The entity type.
|
||||||
|
* @deprecated This is now stored in {@link ItemMeta}. See SPIGOT-1592.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public EntityType getSpawnedType() {
|
public EntityType getSpawnedType() {
|
||||||
return EntityType.fromId(getData());
|
return EntityType.fromId(getData());
|
||||||
}
|
}
|
||||||
|
@ -49,7 +52,9 @@ public class SpawnEgg extends MaterialData {
|
||||||
* Set the type of entity this egg will spawn.
|
* Set the type of entity this egg will spawn.
|
||||||
*
|
*
|
||||||
* @param type The entity type.
|
* @param type The entity type.
|
||||||
|
* @deprecated This is now stored in {@link ItemMeta}. See SPIGOT-1592.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void setSpawnedType(EntityType type) {
|
public void setSpawnedType(EntityType type) {
|
||||||
setData((byte) type.getTypeId());
|
setData((byte) type.getTypeId());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue