1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Cannot Teleport player to another world

Discussion in 'Development' started by NotRedd, Sep 23, 2017.

  1. NotRedd

    NotRedd Silverfish

    Messages:
    17
    In 1.2 I'm having promblems teleporting players to another world using InventoryTransactionEvent
     
  2. NotRedd

    NotRedd Silverfish

    Messages:
    17
    Any help?
     
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    how are you relating inventory to teleportation??
     
  4. NotRedd

    NotRedd Silverfish

    Messages:
    17
    I'm handling it like pressing a item and it Teleporting you to a world
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    do you mean to throw the item, tap the item, or what?
     
  6. NotRedd

    NotRedd Silverfish

    Messages:
    17
  7. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    InventoryTransactionEvent is not called when an item is simply tapped. Utilize the PlayerInteractEvent instead and check if the item in the player's hand is the one you want to check for. Also, learn PocketMine's API before you attempt to link unrelated events. I would recommend reading the docs at https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/namespaces.html
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.