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

remove armor (PlayerJoinEvent)

Comments in 'Plugin Development' started by cake23, Mar 22, 2016.

  1. cake23
    Offline

    cake23 Active Member

    Joined:
    Aug 10, 2015
    Posts:
    124
    Minecraft User:
    TheEnd
    How can I remove the armor if the player join the game? I clear the Inventory with
    PHP:
    $player->getInventory()->clearAll();
    But I dont find a function to clear the armor. Can anyone help me? :D
  2. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    cake23 likes this.
  3. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    /** @var Player $player */
    $player->getInventory()->setContents([]);
    cake23 likes this.

Share This Page

Advertisement