Alex-Novosiber
Пользователь
- Сообщения
- 39
- Плагин
- CraftDrinks
- Ядро сервера
- Spigot
- Версия сервера
- 1.15.2
- Память сервера ОЗУ
- 4Gb
Пишу плагин для Spigot 1.15.
Хочу создать крафт напитков с эффектами, что-то вроде UltraDrinks.
Вываливается ошибка :
[09:30:20] [Server thread/FATAL]: Error executing task on Server
java.lang.IllegalArgumentException: Recipe must have non-AIR result.
Кусок кода :
Хочу создать крафт напитков с эффектами, что-то вроде UltraDrinks.
Вываливается ошибка :
[09:30:20] [Server thread/FATAL]: Error executing task on Server
java.lang.IllegalArgumentException: Recipe must have non-AIR result.
Кусок кода :
// Shapeless Recipe
ItemStack AppleJuice = new ItemStack(Material.POTION);
ItemMeta meta = AppleJuice.getItemMeta ();
meta.setDisplayName ( ChatColor.GREEN + "Яблочный сок" );
// meta.addEnchant(Enchantment.SILK_TOUCH, 10 * 20, true );
NamespacedKey AppleJuicekey = new NamespacedKey(this, "applejuice_key");
ShapelessRecipe AppleJuiceRecipe = new ShapelessRecipe(AppleJuicekey, AppleJuice);
AppleJuiceRecipe.addIngredient(1, Material.APPLE);
AppleJuiceRecipe.addIngredient(1, Material.GLASS_BOTTLE);
Bukkit.addRecipe(AppleJuiceRecipe);
ItemStack AppleJuice = new ItemStack(Material.POTION);
ItemMeta meta = AppleJuice.getItemMeta ();
meta.setDisplayName ( ChatColor.GREEN + "Яблочный сок" );
// meta.addEnchant(Enchantment.SILK_TOUCH, 10 * 20, true );
NamespacedKey AppleJuicekey = new NamespacedKey(this, "applejuice_key");
ShapelessRecipe AppleJuiceRecipe = new ShapelessRecipe(AppleJuicekey, AppleJuice);
AppleJuiceRecipe.addIngredient(1, Material.APPLE);
AppleJuiceRecipe.addIngredient(1, Material.GLASS_BOTTLE);
Bukkit.addRecipe(AppleJuiceRecipe);