I try and remove 1 item from my hand but it doesn't work I tried doing PHP: $player->getInventory()->remove(Item::get(130, 0, 1)); //$player is defined don't worry and it doesn't work, do any of you know?
not the good function remove remove all of the item and removeitem remove an amount of the item https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/inventory/Inventory.php#L108 PHP: $player->getInventory()->removeItem(Item::get(130, 0, 1));
Assuming you mean 1 item from the stack rather than the whole inventory... https://forums.pmmp.io/threads/inventory.4547/#post-42158