Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

again problem with hotbar

Comments in 'Plugin Development' started by Flabe, May 1, 2016.

  1. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    Hey guys, i am adding items in player inventory by : $player->getInventory()->addItem(Item::get($id));
    I want to add item that won't be shown in players hotbar but it will be shown into inventory.
    Thank you for attention. I need your help, please^-^
  2. Irish
    Offline

    Irish Active Member

    Joined:
    Apr 24, 2016
    Posts:
    96
    Minecraft User:
    _Irish_
    Didn't I help you already? You said it worked? What changed between now and then?
  3. udwarf
    Offline

    udwarf Active Member

    Joined:
    Apr 17, 2016
    Posts:
    61
    Minecraft User:
    1Zaza
    Flabe, try to do something with
    $player->getInventory()->setHotbarSlotIndex(...)
  4. Irish
    Offline

    Irish Active Member

    Joined:
    Apr 24, 2016
    Posts:
    96
    Minecraft User:
    _Irish_
    He does not want it in the hotbar, please double check the original message. But it would be $player->getInventory()->setSlot(...);
  5. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV

Share This Page

Advertisement