TravelAgent Returning `null` no matter what

Discussion in 'Plugin Development' started by GeekPlaya, Feb 3, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    GeekPlaya

    No matter if I use a nether portal or an ender portal, if I call "event.getPortalTravelAgent()" in PlayerPortalEvent, it returns null.

    What else is null: getFrom(), getTo()

    Any ideas? I saw someone else made a fix request about this on Thursday. So I'm wondering if this latest update broke the TravelAgent or if I'm doing it wrong?

    I'd post code, but literally all I am doing is making the method, establishing a listener, and printing out: event.getPortalTravelAgent() and it returns null. You also can't instantiate a TravelAgent, so there's no way to replace it!

    Upon further reading, EdGruberman has decided to completely modify the implementation and therefore destroy the getPortalTravelAgent() method which will now almost always return null on custom worlds.

    Any work-arounds?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
Thread Status:
Not open for further replies.

Share This Page