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

A way to tell if the player is in elytra?

Discussion in 'Development' started by jasonwynn10, Apr 7, 2017.

  1. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Exactly as the title states, I am looking for a way to tell if the player is flying an elytra such as a flag or property?
    When a player is flying it shows them to others as walking. This is using @Ad5001 s Elytra plugin.
    I was going to attempt a modification.
     
  2. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    Maybe it's this data flag?
     
    jasonwynn10 and Sandertv like this.
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    will that make the player appear to be flying with elytra rather than being upright?
     
  4. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    I believe so, but the best way to be sure is to test it out.
     
  5. Ad5001

    Ad5001 Silverfish

    Messages:
    16
    GitHub:
    ad5001
    After some time, I discovered something:
    The player action 15 (or 14, I don't exactly remember) is used to start gliding and 16 (or 15 for the same reason) for the stop gliding.
    If you feel so, you could save using a catching datapacket PlayerActionPacket.
     
  6. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Can you edit your plugin to make all players look like they are gliding?
     
  7. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    PHP:
    public function onWings(Player $player){
    if(
    $player->getInventory()->getChestplate()->getId() === 443){
    \\ do 
    stuff
    \\ elytra goes into the chestplate slot thats why i used getChestplate()
    {
    {
     
  8. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    That isn't useful. Sorry
     
  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.