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

Solved How do you put armor on a player?

Comments in 'Plugin Development' started by BlubberBoy333, May 29, 2016.

  1. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    How can I equip a chest plate or another piece of armor on a player?
  2. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    PHP:
     $player->getInventory()->setArmorContents([Item::get(298),Item::get(299),Item::get(300),Item::get(301)]);
  3. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    Oh ok, thanks :D
    PaulchenHD likes this.
  4. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    no problem ^^ <3
  5. udwarf
    Offline

    udwarf Active Member

    Joined:
    Apr 17, 2016
    Posts:
    61
    Minecraft User:
    1Zaza
    Also you can set them separetely:
    PHP:
    $player->getInventory()->setHelmet(Item::get(298));
    $player->getInventory()->setChestplate(Item::get(299));
    $player->getInventory()->setLeggings(Item::get(300));
    $player->getInventory()->setBoots(Item::get(301));
    BlubberBoy333 likes this.

Share This Page

Advertisement