本文整理匯總了Java中org.bukkit.Material.QUARTZ屬性的典型用法代碼示例。如果您正苦於以下問題:Java Material.QUARTZ屬性的具體用法?Java Material.QUARTZ怎麽用?Java Material.QUARTZ使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.bukkit.Material
的用法示例。
在下文中一共展示了Material.QUARTZ屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initialize
@Override
public void initialize() {
shard = new ItemStack(Material.QUARTZ);
ItemMeta im = shard.getItemMeta();
im.setDisplayName(ChatColor.YELLOW + "Shard");
ArrayList<String> lore = new ArrayList<String>();
lore.add(ChatColor.GRAY + "The official currency of Zentrela!");
lore.add("");
lore.add(ChatColor.GRAY + "Use " + ChatColor.YELLOW + "/shard " + ChatColor.GRAY + "to manage your Shards.");
im.setLore(lore);
shard.setItemMeta(im);
cube = new ItemStack(Material.QUARTZ_BLOCK);
im = cube.getItemMeta();
im.setDisplayName(ChatColor.YELLOW + "Shard Cube");
lore = new ArrayList<String>();
lore.add(ChatColor.GRAY + "A cube constructed from 64 Shards.");
lore.add("");
lore.add(ChatColor.GRAY + "Use " + ChatColor.YELLOW + "/shard " + ChatColor.GRAY + "to manage your Shards.");
im.setLore(lore);
cube.setItemMeta(im);
purified = new ItemStack(Material.SEA_LANTERN);
im = purified.getItemMeta();
im.setDisplayName(ChatColor.YELLOW + "Purified Shard Cube");
lore = new ArrayList<String>();
lore.add(ChatColor.GRAY + "A Purified Cube made from 64 Shard Cubes.");
lore.add("");
lore.add(ChatColor.GRAY + "Use " + ChatColor.YELLOW + "/shard " + ChatColor.GRAY + "to manage your Shards.");
im.setLore(lore);
purified.setItemMeta(im);
}
示例2: getMedicine01
/**
* l.add("��2���������Լ��õ����в���ҩ");
l.add("��eҲ������Ҫע�ⰴʱ��ҩ.");
* @return ҩ
*/
public static ItemStack getMedicine01(){
ItemStack sw=new ItemStack(Material.QUARTZ);
ItemMeta im = sw.getItemMeta();
im.setDisplayName("��a��lҩ");
List<String> l=new LinkedList<String>();
l.add("��2���������Լ��õ����в���ҩ");
l.add("��2�������������...");
l.add("��eҲ������Ҫע�ⰴʱ��ҩ.");
im.setLore(l);
sw.setItemMeta(im);
return sw;
}
示例3: addMetaIfNeeded
private ItemStack addMetaIfNeeded(ItemStack stack)
{
Material material = stack.getType();
if (material == Material.COAL || material == Material.IRON_INGOT || material == Material.GOLD_INGOT || material == Material.DIAMOND || material == Material.EMERALD || material == Material.QUARTZ)
return Meta.addMeta(stack);
else
return stack;
}