Advertisement
Guest User

sds

a guest
Oct 27th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. package me.andrew.Test;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. import org.bukkit.Bukkit;
  6. import org.bukkit.ChatColor;
  7. import org.bukkit.Material;
  8. import org.bukkit.enchantments.Enchantment;
  9. import org.bukkit.inventory.ItemStack;
  10. import org.bukkit.inventory.ShapedRecipe;
  11. import org.bukkit.inventory.meta.ItemMeta;
  12. import org.bukkit.plugin.java.JavaPlugin;
  13.  
  14. public class Main extends JavaPlugin
  15. {
  16.  
  17. @Override
  18. public void onEnable()
  19. {
  20. ItemStack tripwirehook = new ItemStack(Material.TRIPWIRE_HOOK, 1);
  21. ItemMeta meta = tripwirehook.getItemMeta();
  22. meta.setDisplayName(ChatColor.RED + "Vote Crate Key");
  23.  
  24. ArrayList<String> lore = new ArrayList<String>();
  25. lore.add(ChatColor.GRAY + "Click the" ChatColor.GREEN + "Vote Crate treasure chest" ChatColor.GRAY + "to use this key");
  26.  
  27. meta.setLore(lore);
  28.  
  29. tripwirehook.setItemMeta(meta);
  30.  
  31. ShapedRecipe Votekey = new ShapedRecipe(tripwirehook);
  32. Votekey.shape(new String[] { " s ", " s ", " w " }).setIngredient('w', Material.WHEAT).setIngredient('s', Material.STICK);
  33. Bukkit.getServer().addRecipe(Votekey);
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement