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

Why isn't their armor being out on?

Discussion in 'Development' started by Zayd, Mar 25, 2017.

  1. Zayd

    Zayd Witch

    Messages:
    55
    GitHub:
    ZaydPE
    [DELETED]
     
    Last edited: Jun 22, 2017
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    @Zayd you could try to pass 1 as third argument, which is the parameter of the item count.

    So instead of: 310, 0, 0
    I'd say: 310, 0, 1
     
  3. Zayd

    Zayd Witch

    Messages:
    55
    GitHub:
    ZaydPE
    Done, still didn't work... I don't know why :(
    You also didn't have to explain third argument, but I appreciate it (I saw the first comment XD)
     
  4. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    Make sure to import Enchantment and Item(from the item directory, not entity directory). Change the 3rd parameter from 0 to 1 because the third parameter represents the item count. Also, enchantments always default to 1, no need to set it.

    EDIT: You could also try using $player->setArmorContents([helm, chestplate, leggings, boots]);
     
  5. Zayd

    Zayd Witch

    Messages:
    55
    GitHub:
    ZaydPE
    Thanks Irish, but do you know who I am? XD
     
  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.