From aee1e203cd28c95279e34fcdd5482dd304e21ef2 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 28 Aug 2020 12:35:11 +1000 Subject: [PATCH] #545: Add EnderSignal ItemStack API By: Parker Hawke --- .../java/org/bukkit/entity/EnderSignal.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/EnderSignal.java b/paper-api/src/main/java/org/bukkit/entity/EnderSignal.java index e90bca8227..1bba155d80 100644 --- a/paper-api/src/main/java/org/bukkit/entity/EnderSignal.java +++ b/paper-api/src/main/java/org/bukkit/entity/EnderSignal.java @@ -1,7 +1,9 @@ package org.bukkit.entity; import org.bukkit.Location; +import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Represents an EnderSignal, which is created upon throwing an ender eye. @@ -44,6 +46,23 @@ public interface EnderSignal extends Entity { */ public void setDropItem(boolean drop); + /** + * Get the {@link ItemStack} to be displayed while in the air and to be + * dropped on death. + * + * @return the item stack + */ + @NotNull + public ItemStack getItem(); + + /** + * Set the {@link ItemStack} to be displayed while in the air and to be + * dropped on death. + * + * @param item the item to set. If null, resets to the default eye of ender + */ + public void setItem(@Nullable ItemStack item); + /** * Gets the amount of time this entity has been alive (in ticks). *