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

TravelAgent persists canCreatePortal after cancelling EntityPortalEvent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None

      https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/f078eed54b23d480eacb0b6f50b1468d5c8c81c5#nms-patches/Entity.patch

      This commit introduced a new bug that when an EntityPortalEvent is cancelled. The canCreatePortal on the TravelAgent is still set to false and never reset to its old value. So if a Player enters a portal afterwards, it will not generate a portal and put them in deathly situations (inside a wall or up in the air).

      recommended fix would be to put
      `agent.setCanCreatePortal(oldCanCreate);`

      just before returning null when the event is cancelled. The TravelAgent being shared per-world is the root cause of the issue and why it persists.

            Unassigned Unassigned
            chickeneer chickeneer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: