I want to edit specific Chests at specific coordinates so like: PHP: $inv = ($x, $y, $z);$inv->addItem(1);
PHP: // you have position for a chest $x $y $z and the world name $world// $main points to a PluginBase instance, which should be $this if you are in the main class$level = $main->getServer()->getLevelByName($world);$tile = $level->getTile(new Vector3($x, $y, $z));if($tile instanceof \pocketmine\tile\Chest){ $inventory = $tile->getInventory(); $inventory->addItem(Item::get(1));} Also keep in mind that Inventory::addItem() accepts variadic parameters of Item, which means that you can pass any amount of parameters into it but they must all be instances of Item; you must not pass an integer.