geforkt von Mirrors/Paper
SPIGOT-1592: Deprecate SpawnEgg spawnedType methods since they cannot be fixed in their current state.
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
27c9b5816e
Commit
a713b811ed
@ -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());
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren