blob: f9298746c7adb7e8173b440a629ee9a8dffec49e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
package org.bukkit.entity;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.util.Vector;
/**
* Represents a base entity in the world
*/
public interface Entity {
/**
* Gets the entity's current position
*
* @return Location containing the position of this entity
*/
public Location getLocation();
/**
* Sets this entity's velocity
*
* @param velocity New velocity to travel with
*/
public void setVelocity(Vector velocity);
/**
* Gets this entity's current velocity
*
* @return Current travelling velocity of this entity
*/
public Vector getVelocity();
/**
* Gets the current world this entity resides in
*
* @return World
*/
public World getWorld();
/**
* Teleports this entity to the given location
*
* @param location New location to teleport this entity to
*/
public void teleportTo(Location location);
/**
* Teleports this entity to the target Entity
*
* @param destination Entity to teleport this entity to
*/
public void teleportTo(Entity destination);
/**
* Returns a unique id for this entity
*
* @return Entity id
*/
public int getEntityId();
/**
* Returns the entity's current fire ticks (ticks before the entity stops being on fire).
*
* @return int fireTicks
*/
public int getFireTicks();
/**
* Returns the entity's maximum fire ticks.
*
* @return int maxFireTicks
*/
public int getMaxFireTicks();
/**
* Sets the entity's current fire ticks (ticks before the entity stops being on fire).
*
* @param ticks
*/
public void setFireTicks(int ticks);
/**
* Mark the entity's removal.
*/
public void remove();
/**
* Gets the {@link Server} that contains this Entity
*
* @return Server instance running this Entity
*/
public Server getServer();
}
|