What is Error? [20:08:54] [Server thread/CRITICAL]: Exception: "Symbol does not appear in the shape: X" (EXCEPTION) in "/src/pocketmine/inventory/ShapedRecipe" at line 99
please read readme please kindly post your code so we can help you we cant help you on your plugin error if we cant even see what gone wrong ex show code
PHP: //зелье опыта из стекла $this->getServer()->getCraftingManager()->registerRecipe((new ShapedRecipe(Item::get(384, 0, 1), "XX", "XX" ))->setIngredient("X", Item::get(20, 0, 1))); //Изумрудный шлем $item["Изумрудный шлем"] = Item::get(310, 0, 1); $item["Изумрудный шлем"]->setCustomName("§r§aИзумрудный шлем"); $item["Изумрудный шлем"]->addEnchantment(Enchantment::getEnchantment(0)->setLevel(2)); $this->getServer()->getCraftingManager()->registerRecipe((new BigShapedRecipe($item["Изумрудный шлем"], "XXX", "XYX", "YYY" ))->setIngredient("X", Item::get(388, 0, 1)));
well i cant help since you only show very small part of the code and i dont even know what is line what
PHP: <?php namespace Crafts; use pocketmine\plugin\PluginBase; use pocketmine\inventory\ShapedRecipe; use pocketmine\inventory\BigShapedRecipe; use pocketmine\item\Item; class Main extends PluginBase {public function registerRecipes(){ $this->getServer()->getCraftingManager()->registerRecipe((new BigShapedRecipe(Item::get(57, 0, 1)->setCustomName("§r§bАлмазно§7-§fяЖелезный§7 блок"), "XXX", "XYX", "XXX" ))->setIngredient("X", Item::get(264, 0, 8))->setIngredient("Y", Item::get(Item::IRON_INGOT, 0, 1)));}} Same error
Yeah, i guess it's the same error, since it's the same faulty code. Where are you guys getting this. It doesn't correspond to anything that PM can interpret as "valid" code. But the code for this is badly written also in PocketMine. That method you are calling probably shouldn't exist, because $shape is private, you can't set it, hence you can't ever really call setIngredient(). Use addIngredient() with x/y instead.
Thank you. I'am replace setIngredient to addIngredient. Error fixed, but in the crafting table not have this craft. What I'm doing wrong?
You have to make sure it is also sent to the player. It should be sent when a player joins, but it all depends on when you adding the recipe. There is a method in server for sending it, but I'm not sure you can access that from a plugin. Guess you have to experiment with it. Server::sendRecipeList(Player $p)
Code: <?php namespace Items; use pocketmine\command\CommandSender; use pocketmine\command\Command; use pocketmine\event\Listener; use pocketmine\plugin\PluginBase; use pocketmine\inventory\ShapedRecipe; use pocketmine\inventory\BigShapedRecipe; use pocketmine\Server; use pocketmine\item\enchantment\Enchantment; use pocketmine\item\Item; use pocketmine\Player; use pocketmine\event\server\DataPacketReceiveEvent; use pocketmine\utils\TextFormat as C; use pocketmine\command\ConsoleCommandSender; class EmeraldItems extends PluginBase implements Listener{ protected $thirstManager; public function onEnable(){ $this->reloadConfig(); $this->getServer()->getPluginManager()->registerEvents($this, $this); // $this->getServer()->getScheduler()->scheduleRepeatingTask(new ThirstTask($this), 10); $this->registerRecipes(); } public function registerRecipes(){ $item = Item::get(310, 0, 1); $item->setCustomName("§8Obsidian Helmet"); $item->addEnchantment(Enchantment::getEnchantment(0)->setLevel(10)); $this->getServer()->getCraftingManager()->registerRecipe((new BigShapedRecipe($item, "XXX", "XYX", "YYY" ))->addIngredient("X", Item::get(Item::OBSIDIAN, 0, 5))->addIngredient("Y", Item::get(Item::AIR, 0, 2))); $item = Item::get(311, 0, 1); $item->setCustomName("§8Obsidian Chestplate"); $item->addEnchantment(Enchantment::getEnchantment(0)->setLevel(10)); $this->getServer()->getCraftingManager()->registerRecipe((new BigShapedRecipe($item, "XYX", "XXX", "XXX" ))->addIngredient("X", Item::get(Item::OBSIDIAN, 0, 7))->addIngredient("Y", Item::get(Item::AIR, 0, 2))); $item = Item::get(312, 0, 1); $item->setCustomName("§8Obsidian Leggings"); $item->addEnchantment(Enchantment::getEnchantment(0)->setLevel(10)); $this->getServer()->getCraftingManager()->registerRecipe((new BigShapedRecipe($item, "XXX", "XYX", "XYX" ))->addIngredient("X", Item::get(Item::OBSIDIAN, 0, 5))->addIngredient("Y", Item::get(Item::AIR, 0, 2))); $item = Item::get(313, 0, 1); $item->setCustomName("§8Obsidian Boots"); $item->addEnchantment(Enchantment::getEnchantment(0)->setLevel(10)); $this->getServer()->getCraftingManager()->registerRecipe((new BigShapedRecipe($item, "YYY", "XYX", "XYX" ))->addIngredient("X", Item::get(Item::OBSIDIAN, 0, 5))->addIngredient("Y", Item::get(Item::AIR, 0, 2))); $item = Item::get(276, 0, 1); $item->setCustomName("§8Obsidian Sword"); $item->addEnchantment(Enchantment::getEnchantment(9)->setLevel(5)); $this->getServer()->getCraftingManager()->registerRecipe((new BigShapedRecipe($item, "GXG", "GXG", "GYG" ))->addIngredient("X", Item::get(Item::OBSIDIAN, 0, 5))->addIngredient("G", Item::get(Item::AIR, 0, 5))->addIngredient("Y", Item::get(Item:: STICK, 0, 2))); } } 2016-12-04 [19:12:34] [Server thread/CRITICAL]: TypeError: "Argument 3 passed to pocketmine\inventory\ShapedRecipe::addIngredient() must be an instance of pocketmine\item\Item, none given, called in phar:///home/gs12648/plugins/Items.phar/src/SIvanov/EmeraldItems.php on line 37" (EXCEPTION) in "/src/pocketmine/inventory/ShapedRecipe" at line 85