TravelAgent persists canCreatePortal after cancelling EntityPortalEvent

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: 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.

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

              Created:
              Updated:
              Resolved: