Commits

Parker Hawke authored and md_5 committed 6ff6e033057
#545: Add EnderSignal ItemStack API
No tags

src/main/java/org/bukkit/entity/EnderSignal.java

Modified
1 1 package org.bukkit.entity;
2 2
3 3 import org.bukkit.Location;
4 +import org.bukkit.inventory.ItemStack;
4 5 import org.jetbrains.annotations.NotNull;
6 +import org.jetbrains.annotations.Nullable;
5 7
6 8 /**
7 9 * Represents an EnderSignal, which is created upon throwing an ender eye.
8 10 */
9 11 public interface EnderSignal extends Entity {
10 12
11 13 /**
12 14 * Get the location this EnderSignal is moving towards.
13 15 *
14 16 * @return the {@link Location} this EnderSignal is moving towards.
37 39
38 40 /**
39 41 * Sets if the EnderSignal should drop an item on death; or if it should
40 42 * shatter.
41 43 *
42 44 * @param drop true if the EnderSignal should drop an item on death, or
43 45 * false if it should shatter.
44 46 */
45 47 public void setDropItem(boolean drop);
46 48
49 + /**
50 + * Get the {@link ItemStack} to be displayed while in the air and to be
51 + * dropped on death.
52 + *
53 + * @return the item stack
54 + */
55 + @NotNull
56 + public ItemStack getItem();
57 +
58 + /**
59 + * Set the {@link ItemStack} to be displayed while in the air and to be
60 + * dropped on death.
61 + *
62 + * @param item the item to set. If null, resets to the default eye of ender
63 + */
64 + public void setItem(@Nullable ItemStack item);
65 +
47 66 /**
48 67 * Gets the amount of time this entity has been alive (in ticks).
49 68 * <br>
50 69 * When this number is greater than 80, it will despawn on the next tick.
51 70 *
52 71 * @return the number of ticks this EnderSignal has been alive.
53 72 */
54 73 public int getDespawnTimer();
55 74
56 75 /**

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut