mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
#883: Add ItemFactory#getSpawnEgg
This commit is contained in:
parent
12eb5c46a8
commit
36022f0280
1 changed files with 12 additions and 0 deletions
|
@ -4,6 +4,7 @@ import org.bukkit.Color;
|
|||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.meta.BookMeta;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
|
@ -159,4 +160,15 @@ public interface ItemFactory {
|
|||
@Deprecated
|
||||
@NotNull
|
||||
Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Gets a {@link Material} representing the spawn egg for the provided
|
||||
* {@link EntityType}. <br>
|
||||
* Will return null for EntityTypes that do not have a corresponding spawn egg.
|
||||
*
|
||||
* @param type the entity type
|
||||
* @return the Material of this EntityTypes spawn egg or null
|
||||
*/
|
||||
@Nullable
|
||||
Material getSpawnEgg(@NotNull EntityType type);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue