Advertisement
minecrftjonne

Untitled

Jul 12th, 2020
1,083
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.40 KB | None | 0 0
  1. package me.binru.customcrafts;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.Material;
  5. import org.bukkit.NamespacedKey;
  6. import org.bukkit.enchantments.Enchantment;
  7. import org.bukkit.event.entity.ItemMergeEvent;
  8. import org.bukkit.inventory.ItemStack;
  9. import org.bukkit.inventory.ShapedRecipe;
  10. import org.bukkit.inventory.meta.ItemMeta;
  11. import org.bukkit.plugin.java.JavaPlugin;
  12. import sun.rmi.rmic.Names;
  13.  
  14. public final class Main extends JavaPlugin {
  15.  
  16.     @Override
  17.     public void onEnable() {
  18.         // Plugin startup logic
  19.  
  20.     }
  21.  
  22.     @Override
  23.     public void onDisable() {
  24.         // Plugin shutdown logic
  25.     }
  26.     public ShapedRecipe getRecipe() {
  27.         ItemStack item = new ItemStack(Material.STICK);
  28.         ItemMeta meta = item.getItemMeta();
  29.  
  30.         meta.setDisplayName(ChatColor.GOLD + "God Staff");
  31.         meta.addEnchant(Enchantment.DAMAGE_ALL, 999, true);
  32.  
  33.         item.setItemMeta(meta);
  34.         NamespacedKey key = new NamespacedKey(this, "god_staff");
  35.         ShapedRecipe recipe = new ShapedRecipe(key, item);
  36.         recipe.shape("DSD","GEG","IEI");
  37.         recipe.setIngredient('D', Material.DIAMOND_BLOCK);
  38.         recipe.setIngredient('S', Material.NETHER_STAR);
  39.         recipe.setIngredient('E', Material.EMERALD_BLOCK);
  40.         recipe.setIngredient('G', Material.GOLD_BLOCK);
  41.         recipe.setIngredient('I', Material.IRON_BLOCK);
  42.         return recipe;
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement