Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4176

PlayerPreTeleportEvent

XMLWordPrintable

    • 1.12.2
    • Yes

      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 after Entity#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.

            Unassigned Unassigned
            molor Zhenya Zima
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: