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

Call to undefined method issue

Discussion in 'Development' started by TheArticGlider, Mar 28, 2018.

  1. TheArticGlider

    TheArticGlider Creeper

    Messages:
    3
    OK, so I have modified the advanced kits plugin, credit to the author, Luca28pet

    I receive this error when I try and use a kit:
    Server thread/CRITICAL Error: "Call to undefined method pocketmine\inventory\PlayerInventory::setHelmet()" (EXCEPTION) in "AdvancedKits.phar/src/AdvancedKits/Kit" at line 79
    I'll attach the plugin:
    I would be so grateful is someone could tell me what is going wrong here
     

    Attached Files:

  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    you need to use $player->getArmorInventory->setHelmet()
     
    TheArticGlider likes this.
  3. TheArticGlider

    TheArticGlider Creeper

    Messages:
    3
    Thank you very much
     
  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.