Commits
Senmori authored and md_5 committed d9006fb04c3
1 1 | package org.bukkit.entity; |
2 2 | |
3 + | import org.bukkit.Location; |
4 + | |
3 5 | /** |
4 - | * Represents an Ender Signal, which is often created upon throwing an ender |
5 - | * eye |
6 + | * Represents an EnderSignal, which is created upon throwing an ender eye. |
6 7 | */ |
7 8 | public interface EnderSignal extends Entity { |
8 9 | |
10 + | /** |
11 + | * Get the location this EnderSignal is moving towards. |
12 + | * |
13 + | * @return the {@link Location} this EnderSignal is moving towards. |
14 + | */ |
15 + | public Location getTargetLocation(); |
16 + | |
17 + | /** |
18 + | * Set the {@link Location} this EnderSignal is moving towards. |
19 + | * <br> |
20 + | * When setting a new target location, the {@link #getDropItem()} resets to |
21 + | * a random value and the despawn timer gets set back to 0. |
22 + | * |
23 + | * @param location the new target location |
24 + | */ |
25 + | public void setTargetLocation(Location location); |
26 + | |
27 + | /** |
28 + | * Gets if the EnderSignal should drop an item on death.<br> |
29 + | * If {@code true}, it will drop an item. If {@code false}, it will shatter. |
30 + | * |
31 + | * @return true if the EnderSignal will drop an item on death, or false if |
32 + | * it will shatter |
33 + | */ |
34 + | public boolean getDropItem(); |
35 + | |
36 + | /** |
37 + | * Sets if the EnderSignal should drop an item on death; or if it should |
38 + | * shatter. |
39 + | * |
40 + | * @param drop true if the EnderSignal should drop an item on death, or |
41 + | * false if it should shatter. |
42 + | */ |
43 + | public void setDropItem(boolean drop); |
44 + | |
45 + | /** |
46 + | * Gets the amount of time this entity has been alive (in ticks). |
47 + | * <br> |
48 + | * When this number is greater than 80, it will despawn on the next tick. |
49 + | * |
50 + | * @return the number of ticks this EnderSignal has been alive. |
51 + | */ |
52 + | public int getDespawnTimer(); |
53 + | |
54 + | /** |
55 + | * Set how long this entity has been alive (in ticks). |
56 + | * <br> |
57 + | * When this number is greater than 80, it will despawn on the next tick. |
58 + | * |
59 + | * @param timer how long (in ticks) this EnderSignal has been alive. |
60 + | */ |
61 + | public void setDespawnTimer(int timer); |
9 62 | } |