Hello, I want to know how to add a item to a players inventory with id and not letters. It doesn't seem to let me do that. Can you help me please?
You can use: PHP: $player->getInventory()->addItem(Item::get(351, 3, 1)); // = 1 Cocoa Bean The first argument is the ID of the item, the second the meta/damage, the third the amount of that item.
STOP PUTTING TITLES AS A SIMPLE "HELP"! You need to put the title as something like: "How to I add item to inventory?"
You can use PHP: if($player->getInventory()->getItemInHand()->getId() === 351) { // if player is holding Dye // do something} for that.
Its gone. Not even there anymore. So, can't try that one on me anymore. Also, don't be "That Guy"... you're that kinda guy who says the stupid things to get people annoyed at you