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

get player in inventorypickupitemevent?

Discussion in 'Development' started by Kyd, Apr 23, 2017.

  1. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    How ?
     
  2. Jonas

    Jonas Baby Zombie

    Messages:
    192
    PHP:
    $player $event->getPlayer()
     
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    jasonwynn10 likes this.
  4. Primus

    Primus Zombie Pigman

    Messages:
    749
    PHP:
    $inv $event->getInventory();
    if(
    $inv instanceof PlayerInventory) {
        
    $player $inv->getHolder();
    }
     
  5. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Working, thank you!
     
  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.