public interface Entity
An Entity can be many different things within the game, and this class contains methods that can apply to any entity within the game.
int getIndex()
This index is guaranteed to stay constant as long as the Entity is not removed from it's manager's list. However, plugins should NOT keep track of Entities by their index, as the Entity occupying a specific index can change.
Instead, keep a reference to the Entity and check the isExpired() method to see if the Entity has been removed from it's manager's list.
boolean isExpired()
An expired Entity has been removed from it's parent manager's list and is no longer valid for use on the game. The Entity will not be shown to players and will not be updated by the main game loop. If an expired Entity is detected, plugins should release all references to the Entity, or a memory leak may result.