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

Check fly enable

Discussion in 'Development' started by #A6543, Feb 23, 2017.

  1. #A6543

    #A6543 Zombie

    Messages:
    267
    Is there a way to check If a player enables fly? (Not is flying() )
     
  2. kaliiks

    kaliiks Zombie

    Messages:
    250
    PlayerToggleFlyghtEvent
     
  3. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    reflector class reflecting on $this->flying under Player class, because the simple way never works
     
  4. #A6543

    #A6543 Zombie

    Messages:
    267
    This only works if the player has AllowFlight. I need to check a double tap on the fly button
     
  5. kaliiks

    kaliiks Zombie

    Messages:
    250
  6. #A6543

    #A6543 Zombie

    Messages:
    267
  7. kaliiks

    kaliiks Zombie

    Messages:
    250
    I tried it without using setAllowFlight and it is working (In creative)
     
  8. #A6543

    #A6543 Zombie

    Messages:
    267
    In creative u have AllowFlight :p
     
  9. kaliiks

    kaliiks Zombie

    Messages:
    250
    But, there is not another way to allow flight without creative or setAllowFlight in PocketMine
     
  10. #A6543

    #A6543 Zombie

    Messages:
    267
    Try it in survival. It doesn't work (I don't want allow fight. Only check if a player double tap the button)
     
  11. kaliiks

    kaliiks Zombie

    Messages:
    250
    Players cant fly i survivival without setAllowFlight omg! What u want check
     
  12. #A6543

    #A6543 Zombie

    Messages:
    267
    Lel I already said that I don't want to check if the player is flying or can fly. I want to check the double tap on the button
     
  13. kaliiks

    kaliiks Zombie

    Messages:
    250
    If player is in survival without setAllowFlight he has only jump button!
     
  14. #A6543

    #A6543 Zombie

    Messages:
    267
    I know. And I want to check if the player double tap that button
     
  15. kaliiks

    kaliiks Zombie

    Messages:
    250
    PlayerAction Packet Aciton start glide
     
  16. #A6543

    #A6543 Zombie

    Messages:
    267
    And how can I use it?
     
  17. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    you should have said double jump,
    i believe there a packet somewhere
    wait... this looks very familiar i remember talked about this somewhere else
     
  18. #A6543

    #A6543 Zombie

    Messages:
    267
    There is a Jump action in the PlayerActionPacket. But does it call if the player is in the air? And how can I check if it's called?
     
  19. kaliiks

    kaliiks Zombie

    Messages:
    250
    check Air Tick
     
  20. #A6543

    #A6543 Zombie

    Messages:
    267
    How? And how can I check the packet?
     
  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.