Skip to content

Add PlayerPrepareTeleportEvent - #14184

Open
ThatTransSky wants to merge 4 commits into
PaperMC:mainfrom
ThatTransSky:PlayerPrepareTeleportEvent
Open

Add PlayerPrepareTeleportEvent#14184
ThatTransSky wants to merge 4 commits into
PaperMC:mainfrom
ThatTransSky:PlayerPrepareTeleportEvent

Conversation

@ThatTransSky

@ThatTransSky ThatTransSky commented Aug 13, 2026

Copy link
Copy Markdown

Continuing off of #12879, Adding PlayerPrepareTeleportEvent would allow plugin developers to better handle the case of disallowed cross-world teleports when the player has passengers.

There seems to be a need for some kind of a solution, even if a temporary one, since there's no way to handle this case as PlayerTeleportEvent doesn't fire at all if the player has passengers.

Relevant issues: #12093, #10168 & #10173.

Let me know if this PR is missing anything and I'll make any necessary changes!

@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Aug 13, 2026
@ThatTransSky
ThatTransSky marked this pull request as ready for review August 13, 2026 14:20
@ThatTransSky
ThatTransSky requested a review from a team as a code owner August 13, 2026 14:20

@Cubicake Cubicake left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a Paper contributor so my opinion is meaningless but this generally looks cool to me.

@ThatTransSky
ThatTransSky force-pushed the PlayerPrepareTeleportEvent branch from 85c0a29 to 096c39c Compare August 17, 2026 09:44
@ThatTransSky
ThatTransSky force-pushed the PlayerPrepareTeleportEvent branch from 096c39c to 7317109 Compare August 17, 2026 09:47
@ThatTransSky

Copy link
Copy Markdown
Author

Ignore the force pushes, I misunderstood the original comment 😅

@Cubicake

Copy link
Copy Markdown

Set.of() is already immutable, you don't need to use ImmutableSet

@ThatTransSky

ThatTransSky commented Aug 17, 2026

Copy link
Copy Markdown
Author

Set.of() would make a Set<Set<TeleportFlag>> (since the teleportFlags parameter is already a Set<TeleportFlag) which why I got confused in the first place.
I can still switch to Set.copyOf() (I just forgot it was a thing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

2 participants