Why does not work? How to generate a chest on random coordinates? How to add items to this chest? if($cmd->getName() == "event"){ if($sender->hasPermission("event.event")){ $x = rand(1,100); $y = rand(80,100); $z = rand(1,100); $sender->getLevel()->setBlock(new Vector3($x, $y, $z), Block::get(54, 0)); $sender->getServer()->broadcastMessage("§f• §8[§cEvent§8]§7 Skrzynka z cennymi itemami została wygenerowana na: X: $x Y: $y Z: $z §f•"); } else{ $sender->sendMessage("§f• §8[§cEvent§8]§7 Ta komenda jest tylko dla administracji! §f•"); } }