Advertisement
danik159

Untitled

Sep 14th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. List<String> info = new ArrayList<>();
  2. info.add(ChatColor.LIGHT_PURPLE + "You can use this craft system to create new items!" );
  3. info.add(ChatColor.LIGHT_PURPLE + "Just put the specific items in the craft and you will get new item!");
  4. info.add(ChatColor.LIGHT_PURPLE + "To get more help write /crafthelp");
  5. info.add(ChatColor.GRAY + "© ChickenStyle");
  6. ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
  7. ItemMeta meta = glass.getItemMeta();
  8. meta.removeItemFlags(ItemFlag.HIDE_ATTRIBUTES);
  9. meta.setDisplayName(" ");
  10. glass.setItemMeta(meta);
  11.  
  12. ItemStack paper = new ItemStack(Material.PAPER);
  13. ItemMeta papermeta = paper.getItemMeta();
  14. papermeta.setDisplayName(ChatColor.LIGHT_PURPLE + "Info");
  15. papermeta.setLore(info);
  16. papermeta.removeItemFlags(ItemFlag.HIDE_ATTRIBUTES);
  17. paper.setItemMeta(papermeta);
  18.  
  19. List<String> recipes = new ArrayList<>();
  20. recipes.add(ChatColor.LIGHT_PURPLE + "Here you can see all the craft" );
  21. recipes.add(ChatColor.LIGHT_PURPLE + "Of out unique items!");
  22. recipes.add(ChatColor.LIGHT_PURPLE + "Click on it to look at them!");
  23. recipes.add(ChatColor.GRAY + "© ChickenStyle");
  24.  
  25. ItemStack star = new ItemStack(Material.NETHER_STAR);
  26. ItemMeta starmeta = star.getItemMeta();
  27. starmeta.setDisplayName(ChatColor.LIGHT_PURPLE + "Recipes");
  28. starmeta.setLore(recipes);
  29. starmeta.removeItemFlags(ItemFlag.HIDE_ATTRIBUTES);
  30. star.setItemMeta(starmeta);
  31.  
  32. List<String> mega = new ArrayList<>();
  33. mega.add(ChatColor.LIGHT_PURPLE + "Here you can craft really expensive" );
  34. mega.add(ChatColor.LIGHT_PURPLE + "and good items!!");
  35. mega.add(ChatColor.LIGHT_PURPLE + "Click on it to craft of them!");
  36. mega.add(ChatColor.GRAY + "© ChickenStyle");
  37.  
  38. ItemStack crafting = new ItemStack(Material.CRAFTING_TABLE);
  39. ItemMeta cmeta = crafting.getItemMeta();
  40. cmeta.setDisplayName(ChatColor.LIGHT_PURPLE + "Mega Crafting");
  41. cmeta.setLore(mega);
  42. cmeta.removeItemFlags(ItemFlag.HIDE_ATTRIBUTES);
  43. crafting.setItemMeta(cmeta);
  44.  
  45. ItemStack air = new ItemStack(Material.AIR);
  46. if (ChatColor.translateAlternateColorCodes('&', e.getView().getTitle()).equals(ChatColor.GRAY + "CraftingPlus")) {
  47. if (item == null || item == air) {
  48.  
  49. } else if (item == star) {
  50. e.setCancelled(true);
  51. ApplyGuiHelp(player);
  52. } else if (item == mega) {
  53. e.setCancelled(true);
  54. MegaGui(player);
  55. } else if (slot == 24) {
  56. if (item != null || item != air) {
  57. gui.setItem(11, null);
  58. gui.setItem(20, null);
  59. gui.setItem(29, null);
  60. gui.setItem(30, null);
  61. gui.setItem(21, null);
  62. gui.setItem(31, null);
  63. gui.setItem(22, null);
  64. gui.setItem(13, null);
  65. gui.setItem(12, null);
  66. player.getWorld().playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, 2f, 1f);
  67. }
  68. } else if (item == glass){
  69. e.setCancelled(true);
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement