mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-21 07:41:30 +01:00
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 <byron.shelden@gmail.com>
This commit is contained in:
parent
1a8031fc8f
commit
e492d55dc4
@ -42,6 +42,23 @@ public interface Entity {
|
||||
* Teleports this entity to the given location
|
||||
*
|
||||
* @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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user