Advertisement
Guest User

Untitled

a guest
Jul 11th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. @EventHandler
  2. public void onClick(InventoryClickEvent e) {
  3.  
  4. try {
  5. Player p = (Player)e.getWhoClicked();
  6. if(e.getCurrentItem().getItemMeta().getDisplayName().equals("§a§lKöpfe") && e.getCurrentItem().getType() == Material.SKULL_ITEM) {
  7. Inventory inv = Bukkit.createInventory(null, 5*9, "§8» §3§lKöpfe §8«");
  8.  
  9. ItemStack Kopf1 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3);
  10. SkullMeta Kopf1meta = (SkullMeta) Kopf1.getItemMeta();
  11. Kopf1meta.setOwner("xdrawngamerhd");
  12. Kopf1meta.setDisplayName("§aKopf von xDrawnGamerHD");
  13. ArrayList<String> Kopf1lore = new ArrayList<>();
  14. Kopf1lore.add("§3➤ §cBester Kopf!");
  15. Kopf1meta.setLore(Kopf1lore);
  16. Kopf1.setItemMeta(Kopf1meta);
  17.  
  18. inv.setItem(1, Kopf1);
  19.  
  20. p.getPlayer().playSound(p.getPlayer().getLocation(), Sound.CHEST_OPEN, 1F, 1F);
  21. p.openInventory(inv);
  22. p.sendMessage(Main.Prefix + "§cDieses Feature ist bald verfügbar.");
  23. } else {
  24. return;
  25. }
  26. } catch(Exception e0) {
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement