Please be more descriptive. What code did you use? What did you expect to happen? Any errors/output? Have you tried debugging? Does it do anything at all?
I does nothing. I defined the inventory $i. And tried to open it using $player->addWindow($i); No errors
I don't know if it is possible to send a PlayerInventory to a non-corresponding Player, and I don't think many people have ever tried. Maybe you could create a CustomInventory class and have it duplicate the contents of the PlayerInventory?
You cannot open a player inventory from an action in server-side, It's not supported in MCPE or even MCPC. ^ as he said, also make unique slot positions for armour/arrow slots.