Added cause to PlayerTeleportEvent

By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-12-04 11:03:32 +00:00
parent c90d52a4d3
commit f3ddaaf09f
3 changed files with 62 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import org.bukkit.util.Vector;
import java.util.List;
import java.util.UUID;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
/**
* Represents a base entity in the world
@@ -50,6 +51,15 @@ public interface Entity {
*/
public boolean teleport(Location location);
/**
* Teleports this entity to the given location
*
* @param location New location to teleport this entity to
* @praram cause The cause of this teleportation
* @return <code>true</code> if the teleport was successful
*/
public boolean teleport(Location location, TeleportCause cause);
/**
* Teleports this entity to the target Entity
*
@@ -58,6 +68,15 @@ public interface Entity {
*/
public boolean teleport(Entity destination);
/**
* Teleports this entity to the target Entity
*
* @param destination Entity to teleport this entity to
* @praram cause The cause of this teleportation
* @return <code>true</code> if the teleport was successful
*/
public boolean teleport(Entity destination, TeleportCause cause);
/**
* Returns a list of entities within a bounding box defined by x,y,z centered around player
*