Possible bug in teleportAsync #26
Labels
No labels
documentation
good first issue
help wanted
resolution: duplicate
resolution: invalid
resolution: won't fix
status: needs triage
type: bug
type: feature
type: performance
type: question
version: 1.19.4
version: 1.20
version: 1.20.1
version: 1.20.2
version: 1.20.4
version: 1.20.6
version: 1.21.11
version: 1.21.4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Minecraft/Folia#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stack trace
Plugin and Datapack List
AuthMeReloaded
Actions to reproduce (if known)
Bukkit.isOwnedByCurrentRegion(entity).teleportAsync(entity, loc)Folia version
Latest commit, 7072994
Other
teleportAsync() documentation tells that it should return a future with the result of the teleport, it shouldn't throw an exception if the teleport is not possible.
Entity#teleportAsync will remove the entity from the world when teleporting far (and as such will cause the current region to lose ownership of the player), and as a courtesy to other plugins you should not use it inside events. This is expected behavior for PlayerJoinEvent as well, since the player is not in the world yet.
As an amendment, there are other events to proper change the spawn location that isn't PlayerJoin, even when not using Folia, see PlayerSpawnLocation & methods.