-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlayerPreTeleportEvent #1285
Comments
In mini-games, this can seriously interfere with the gameplay. For example, MobArena will assume that the player has been moved to the arena and already takes damage from mobs, but in fact he is on spawn and looks in the chat, what is now the wave number and what prizes he received. |
I have changes in my fork that i've been meaning to bring to paper that allows entities to teleport with passengers, wouldn't that be better? |
@aikar I would love that teleport with passengers patch ^_^ |
Potential patches to pull for this issue:
These are different solutions with different mindsets to the same problem, so we'll have to decide for one or the other. EmpireCraft's seems to be the one which would best fit in this case, given it fixes the contract in |
As far as I can read, this has been addressed at https://github.com/PaperMC/Paper/blob/master/patches/server/0920-More-Teleport-API.patch#L39-L63 If it hasn't or this code is faulty, please open a new issue for an amendment to the aforementioned patch. Thanks! |
If any plugin teleports a player using
Entity#teleport()
, and the player has at least one passenger, then in fact he will not be teleported, but the plugin will consider otherwise.It is not possible to remove passengers from the player using
PlayerTeleportEvent
, as in this case it is not called. However, if it was called - it's still useless, because the player would not have been teleported.So I suggest adding an
PlayerPreTeleportEvent
that will be called before the actual teleport, but immediately afterEntity#teleport()
is invoked, so that passengers can be removed using custom plugin and they do not interfere with the process of teleportation.You can also solve this problem by removing passengers in the
Entity#teleport()
method itself.The text was updated successfully, but these errors were encountered: