Paper/patches/api/0334-Add-ItemFactory-getMonsterEgg-API.patch

26 Zeilen
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Thu, 14 Oct 2021 12:09:28 -0500
Subject: [PATCH] Add ItemFactory#getMonsterEgg API
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 5793a02ff5ec9310c23c471529226b300d43ec7c..bd2500068e984bd06b1121c34adbaaefda9c746a 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -244,5 +244,14 @@ public interface ItemFactory {
@NotNull
@Deprecated
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
+
+ /**
2021-10-20 23:41:54 +02:00
+ * Get a spawn egg ItemStack from an EntityType
+ *
+ * @param type EntityType
+ * @return ItemStack spawner egg
+ */
+ @Nullable
2021-10-20 23:41:54 +02:00
+ ItemStack getSpawnEgg(@Nullable org.bukkit.entity.EntityType type);
// Paper end
}