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

Get item name from config?

Discussion in 'Development' started by romainbizet46, Oct 26, 2017.

  1. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    Error:
    PHP:
    [22:06:17] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\block\BlockBreakEvent' to 'MineReward v1'Call to a member function getName() on integer on a\a
    [22:06:17] [Server thread/CRITICAL]: Error"Call to a member function getName() on integer" (EXCEPTIONin "Mine-Reward-master/src/a/a" at line 32
    Line 32
    PHP:
    $itemname $this->getConfig()->get("item")->getName();
    Config
    PHP:
    item388
    Already thank for support
     
  2. QuiverlyRivalry

    QuiverlyRivalry Zombie Pigman

    Messages:
    491
    GitHub:
    quiverlyrivalry
    Dude legit calm down!
    We just cant immedietly answer your question.
    Just relax takes rime xD
     
  3. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    jasonwynn10 and romainbizet46 like this.
  4. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    I m know and agree but in this plugin i use config.
    I need to know item name to send this last one in message
     
  5. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    Once you have returned the Item in the config, which is an Id ofc, you need to make it into a Item , Item::get() does that!
     
    jasonwynn10 and romainbizet46 like this.
  6. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    Am not going to do the code for you! Ive given most of the resources you need.
     
    jasonwynn10 and romainbizet46 like this.
  7. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    I will try m'y self tank 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.