本文整理汇总了Java中org.bukkit.Material.FIREWORK属性的典型用法代码示例。如果您正苦于以下问题:Java Material.FIREWORK属性的具体用法?Java Material.FIREWORK怎么用?Java Material.FIREWORK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.bukkit.Material
的用法示例。
在下文中一共展示了Material.FIREWORK属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRepresentation
/**
* {@inheritDoc}
*/
@Override
public default ItemStack getRepresentation() {
ItemStack stack = new ItemStack(Material.FIREWORK);
ItemMeta meta = stack.getItemMeta();
meta.setDisplayName(ChatColor.GRAY + "Fireworks");
stack.setItemMeta(meta);
return stack;
}
示例2: registerRunes
private void registerRunes() {
Rune rune;
rune = new Rune("Freeze", Material.ICE, 15, -1);
rune.addDescription(ChatColor.GRAY + "Freezes target");
rune.addDescription(ChatColor.GRAY + "Range: " + ChatColor.RED + "10 blocks");
rune.addDescription(ChatColor.GRAY + "Freeze duration: " + ChatColor.RED + "3 second");
runes.add(rune);
rune = new Rune("Fire Storm", Material.BLAZE_POWDER, 25, 30);
rune.addDescription(ChatColor.GRAY + "Sets everyone around on fire");
rune.addDescription(ChatColor.GRAY + "Range: " + ChatColor.RED + "2 blocks");
rune.addDescription(ChatColor.GRAY + "Burning duration: " + ChatColor.RED + "2 seconds");
runes.add(rune);
rune = new Rune("Slowdown", Material.WEB, 15, 30);
rune.addDescription(ChatColor.GRAY + "Slows everyone around");
rune.addDescription(ChatColor.GRAY + "Range: " + ChatColor.RED + "3 blocks");
rune.addDescription(ChatColor.GRAY + "Slow Level: " + ChatColor.RED + "I");
rune.addDescription(ChatColor.GRAY + "Slow duration: " + ChatColor.RED + "5 seconds");
runes.add(rune);
rune = new Rune("Invisibility", Material.GRASS, 10, 5);
rune.addDescription(ChatColor.GRAY + "Gives uninterruptible invisibility");
runes.add(rune);
rune = new Rune("Lightning", Material.FIREWORK, 15, -1);
rune.addDescription(ChatColor.GRAY + "Strikes lightning at target position");
rune.addDescription(ChatColor.GRAY + "Range: " + ChatColor.RED + "20 blocks");
rune.addDescription(ChatColor.GRAY + "Damage: " + ChatColor.RED + "5 hearts");
runes.add(rune);
rune = new Rune("Detonate", Material.TNT, 20, -1);
rune.addDescription(ChatColor.GRAY + "Strikes explosion at your location");
rune.addDescription(ChatColor.GRAY + "Explosion range: " + ChatColor.RED + "4 blocks");
rune.addDescription(ChatColor.GRAY + "Damage: " + ChatColor.RED + "3 hearts");
runes.add(rune);
}