rename method to getSpawnEgg

This commit is contained in:
Jake Potrebic 2021-10-20 14:41:54 -07:00
parent 9d570042ed
commit 55ca459515
No known key found for this signature in database
GPG key ID: 7C58557EC9C421F8
2 changed files with 5 additions and 5 deletions

View file

@ -5,7 +5,7 @@ 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 diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 0a4466c6ca519c3a5da76ff870fb2a4e3a06effd..d87ec9754f8327ad163c91f0941e195cc970c1ed 100644 index 0a4466c6ca519c3a5da76ff870fb2a4e3a06effd..8677e273641a46aae7107361f23f6ded59a50dc0 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java --- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -241,5 +241,14 @@ public interface ItemFactory { @@ -241,5 +241,14 @@ public interface ItemFactory {
@ -14,12 +14,12 @@ index 0a4466c6ca519c3a5da76ff870fb2a4e3a06effd..d87ec9754f8327ad163c91f0941e195c
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); 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);
+ +
+ /** + /**
+ * Get a monster egg ItemStack from an EntityType + * Get a spawn egg ItemStack from an EntityType
+ * + *
+ * @param type EntityType + * @param type EntityType
+ * @return ItemStack spawner egg + * @return ItemStack spawner egg
+ */ + */
+ @Nullable + @Nullable
+ ItemStack getMonsterEgg(@Nullable org.bukkit.entity.EntityType type); + ItemStack getSpawnEgg(@Nullable org.bukkit.entity.EntityType type);
// Paper end // Paper end
} }

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add ItemFactory#getMonsterEgg API
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index aa7fd5c80712fecca1110341a234f60e8607b809..1e80d3e6778850e859e2f9c0c2fecb0d6ff1a8bb 100644 index aa7fd5c80712fecca1110341a234f60e8607b809..a30bb0a1dde5b5a7980331914a5f852e6bcd19dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -409,5 +409,17 @@ public final class CraftItemFactory implements ItemFactory { @@ -409,5 +409,17 @@ public final class CraftItemFactory implements ItemFactory {
@ -14,7 +14,7 @@ index aa7fd5c80712fecca1110341a234f60e8607b809..1e80d3e6778850e859e2f9c0c2fecb0d
} }
+ +
+ @Override + @Override
+ public ItemStack getMonsterEgg(org.bukkit.entity.EntityType type) { + public ItemStack getSpawnEgg(org.bukkit.entity.EntityType type) {
+ if (type == null) { + if (type == null) {
+ return null; + return null;
+ } + }