Advertisement
craftim_74

Untitled

Jan 15th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. Inventory inv = Bukkit.createInventory(null, 54, "§cStaff");
  2.            
  3.         for(int i = 0; i < staff.size(); i++){
  4.             String online = "§cnon";
  5.             String grade = "joueur";
  6.            
  7.             if(Bukkit.getPlayer(staff.get(i)) != null){
  8.                 online = "§aoui";
  9.             }
  10.            
  11.             ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3);
  12.             SkullMeta meta = (SkullMeta) skull.getItemMeta();
  13.             meta.setDisplayName("§l"+staff.get(i));
  14.             meta.setLore(Arrays.asList("§fGrade : "+grade, "§fEn ligne : "+online));
  15.             meta.setOwner(staff.get(i));
  16.             skull.setItemMeta(meta);
  17.            
  18.             inv.addItem(skull);
  19.            
  20.             if(i == inv.getSize()){
  21.                 break;
  22.             }
  23.         }
  24.         p.openInventory(inv);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement