[SPIGOT-1517] Have teleport method return success if the teleported entity / player actually reaches the destination. Created: 25/Feb/16 Updated: 25/Feb/16 |
|
| Status: | Open |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Frank F | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Bukkit, Teleportation | ||
| Plugin: | N/A |
| Description |
|
If you are to teleport an entity or a player to a destination the success is only determined if the event is not cancelled or not. The success of that teleport should also include if the player / entity actually reaches that destination or not as there is nothing to verify that. It should be a combination of if the event is cancelled or not and if the player / entity actually reaches the destination OR another method that will check does the player / entity actually get to that location when called. |
| Comments |
| Comment by Black Hole [ 25/Feb/16 ] |
|
Any plugin could alter the destination. So it's a success if the player was teleported. You'll get false if the player is not teleported at all, like if he's dead. Anyway, you could verify the location of the player after your call to teleport(). |