From e492d55dc448e060572281a6419f74994a480679 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 23 Mar 2011 00:15:46 -0700 Subject: [PATCH] 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(...). By: Byron Shelden --- .../main/java/org/bukkit/entity/Entity.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index f9298746c..a7adc54a9 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -42,6 +42,23 @@ public interface Entity { * Teleports this entity to the given location * * @param location New location to teleport this entity to + * @return true 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 true 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); @@ -49,6 +66,7 @@ public interface Entity { * Teleports this entity to the target Entity * * @param destination Entity to teleport this entity to + * @deprecated use {@link #teleport(Entity)} */ public void teleportTo(Entity destination);