How can i open the crafting table with a command ? Code: [Server thread/CRITICAL]: Error: "Call to undefined method pocketmine\Player::getTile()" (EXCEPTION) PHP: public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args) : bool{ switch($cmd->getName()){ case "craft": if($sender instanceof Player){ $sender->getTile(new Vector3(100, 60, 100))->getInventory(); } } }
Probably it isn't possible but you can try it. 1) Add the Player->getLevel() because Player->getTile doesn't work PHP: $sender->getLevel()->getTile(new Vector3(100, 60, 100))->getInventory(); 2) Add crafting table closer to the player