Add PlayerTeleportFailedEvent
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem?
Hello 👋🏻 currently there is no way to know if a teleport failed due to a player having passengers. Which means if any plugin uses player.teleport() the teleport fails. This is a huge problem as it prevents compatibility between plugins.
Describe the solution you'd like.
I would like to see a PlayerTeleportFailedEvent added to paper. This means that when a teleport fails we could handle the passengers correctly and then re-teleport the player to enable the functionality again.
Describe alternatives you've considered.
I have tried the PlayerCommandPreprocessEvent to listen in on commands that teleport the player although this is limited as it means every single command needs to be manually added and there is no way to detect plugins that use teleporting it in other cases.
Other
I did find that there was a pull request for this exact feature #10173 and even though it had a lot of engagement it was never added 😟
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pull request #10173 and the existing player.teleport() behavior; PlayerCommandPreprocessEvent is only the stated workaround. Done means Paper exposes PlayerTeleportFailedEvent when a player teleport fails because of passengers, allowing plugins to handle the passengers and retry the teleport.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100