Added Entity interfaces, changed Player to implement these

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2010-12-29 22:11:33 +00:00
parent 7459a15477
commit 033223a9f7
5 changed files with 311 additions and 15 deletions

View File

@@ -0,0 +1,35 @@
package org.bukkit;
/**
* Represents a base entity in the world
*/
public interface Entity {
/**
* Gets the entitys current position
*
* @return Location containing the position of this entity
*/
public Location getLocation();
/**
* 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);
/**
* Returns a unique ID for this entity
*
* @return Entity ID
*/
public int getEntityID();
}