Skip to content

Instantly share code, notes, and snippets.

@phase
Created May 25, 2014 06:54
Show Gist options
  • Save phase/10788d9f3fc34233304a to your computer and use it in GitHub Desktop.
Save phase/10788d9f3fc34233304a to your computer and use it in GitHub Desktop.
public static ItemStack createItem(Material m, int amount, byte data, String name, String... lore){
ItemStack item = new ItemStack(m, amount, data);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(name);
List<String> list = new ArrayList<String>();
for(String l : lore)
list.add(l);
meta.setLore(list);
item.setItemMeta(meta);
return item;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment