Discussion in 'Plugin Development' started by bergerkiller, Jul 24, 2011.

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


    I am trying to teleport the player to a different Portal based on a Sign that is near (and registered).
    Everything works, but I can't seem to make the PLAYER_PORTAL event fire at all...
        public void onPlayerPortal(PlayerPortalEvent event) {
    pm.registerEvent(Event.Type.PLAYER_PORTAL, playerListener, Priority.Highest, this);
    Anyone knows what could be wrong? I don't want to handle the PLAYER_MOVE for something this simple...


    It requires the hell setting to be enabled...sigh. Any workaround for this?
  2. Offline


    Did you register the listener for PLAYER_PORTAL? Also, I never messed with it, but could this event actually just trigger on entering the Nether through the portal?
  3. Offline


    Yeah it seems to be that is the case. It only fires if I enable hell on my server...
    I have no problem with teleportation to hell if it has no sign near, but I don't feel like restricting hell for my plugin to work...Players stay in the same world. (Although cross-world teleportation is possible)

    I'll check if a portal block is near a player in the onPlayerMove event...for now.
    Would allow instant teleportation, which is actually even better. :)
  4. Offline


    You also got an entityPortalEnter event, which is also send when a player enters a portal, you can try to use that.
  5. Offline


    Wow, thank you! ;)
    This is exactly what I needed; less laggy and almost instant!

    I always take mobs as entity, it can backfire now and then. [fire]
Thread Status:
Not open for further replies.

Share This Page