Advertisement
Guest User

CraftingRecipes.java

a guest
Nov 18th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. package de.cheekz.craftingrecipes.main;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.Material;
  5. import org.bukkit.enchantments.Enchantment;
  6. import org.bukkit.inventory.ItemStack;
  7. import org.bukkit.inventory.ShapedRecipe;
  8. import org.bukkit.inventory.meta.ItemMeta;
  9. import org.bukkit.plugin.java.JavaPlugin;
  10.  
  11. public class CraftingRecipesMain extends JavaPlugin {
  12.    
  13.     public void onEnable() {
  14.        
  15.         ItemStack PhoenixSword = new ItemStack(Material.GOLD_SWORD);
  16.         ItemMeta PhoenixSwordMeta = PhoenixSword.getItemMeta();
  17.         PhoenixSwordMeta.setDisplayName("Der Phönix");
  18.         PhoenixSwordMeta.addEnchant(Enchantment.DAMAGE_ALL, 5, true);
  19.         PhoenixSwordMeta.addEnchant(Enchantment.FIRE_ASPECT, 1, true);
  20.         PhoenixSword.setItemMeta(PhoenixSwordMeta);
  21.        
  22.         ShapedRecipe PhoenixSwordRecipe = new ShapedRecipe(PhoenixSword);
  23.         PhoenixSwordRecipe.shape("G", "G", "B");
  24.         PhoenixSwordRecipe.setIngredient('G', Material.GOLD_BLOCK, 64);
  25.         PhoenixSwordRecipe.setIngredient('B', Material.BLAZE_ROD);
  26.        
  27.         Bukkit.addRecipe(PhoenixSwordRecipe);
  28.        
  29.     }
  30.     public void onDisable() {
  31.        
  32.     }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement