Replaced void teleportTo(Location) with boolean teleport(Location).

- The return value indicates if the teleport was successful.
 - void teleportTo(...) should delegate to the new teleport(...).
This commit is contained in:
Byron Shelden 2011-03-23 00:15:46 -07:00 committed by Erik Broes
parent d6341293e7
commit fbbae50ba0

View File

@ -42,6 +42,23 @@ public interface Entity {
* Teleports this entity to the given location * Teleports this entity to the given location
* *
* @param location New location to teleport this entity to * @param location New location to teleport this entity to
* @return <code>true</code> if the teleport was successful
*/
public boolean teleport(Location location);
/**
* Teleports this entity to the target Entity
*
* @param destination Entity to teleport this entity to
* @return <code>true</code> if the teleport was successful
*/
public boolean teleport(Entity destination);
/**
* Teleports this entity to the given location
*
* @param location New location to teleport this entity to
* @deprecated use {@link #teleport(Location)}
*/ */
public void teleportTo(Location location); public void teleportTo(Location location);
@ -49,6 +66,7 @@ public interface Entity {
* Teleports this entity to the target Entity * Teleports this entity to the target Entity
* *
* @param destination Entity to teleport this entity to * @param destination Entity to teleport this entity to
* @deprecated use {@link #teleport(Entity)}
*/ */
public void teleportTo(Entity destination); public void teleportTo(Entity destination);