Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.andrew.Test;
- import java.util.ArrayList;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.Material;
- import org.bukkit.enchantments.Enchantment;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.inventory.ShapedRecipe;
- import org.bukkit.inventory.meta.ItemMeta;
- import org.bukkit.plugin.java.JavaPlugin;
- public class main extends JavaPlugin
- {
- public void onEnable()
- {
- ItemStack stick = new ItemStack(Material.STICK, 1);
- ItemMeta meta = stick.getItemMeta();
- meta.setDisplayName("Broom Stick");
- ArrayList<String> lore = new ArrayList<String>();
- lore.add(ChatColor.RED + "This is a Broom");
- lore.add(ChatColor.GREEN + "Sweep, Sweep, Sweep");
- meta.setLore(lore);
- meta.addEnchant(Enchantment.DAMAGE_ALL, 2, true);
- stick.setItemMeta(meta);
- ShapedRecipe broomStick = new ShapedRecipe(stick);
- broomStick.shape(new String[] { " s ", " s ", " w " }).setIngredient('w', Material.WHEAT).setIngredient('s', Material.STICK);
- Bukkit.getServer().addRecipe(broomStick);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement