#545: Add EnderSignal ItemStack API

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot 2020-08-28 12:35:11 +10:00
parent c642284c9c
commit aee1e203cd

View File

@ -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).
* <br>