当前位置: 首页>>代码示例>>Java>>正文


Java Material.GHAST_TEAR属性代码示例

本文整理汇总了Java中org.bukkit.Material.GHAST_TEAR属性的典型用法代码示例。如果您正苦于以下问题:Java Material.GHAST_TEAR属性的具体用法?Java Material.GHAST_TEAR怎么用?Java Material.GHAST_TEAR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.bukkit.Material的用法示例。


在下文中一共展示了Material.GHAST_TEAR属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

@Override
public void run() {
    for(Item item : Bukkit.getWorlds().get(0).getEntitiesByClass(Item.class)) {
        if(item.getItemStack().getType() != Material.GHAST_TEAR) continue;
        UUID skip = Gizmos.gunGizmo.items.get(item);

        for(Entity entity : item.getNearbyEntities(0.5d, 0.5d, 0.5d)) {
            if(entity instanceof Player && !entity.getUniqueId().equals(skip)) {
                Player player = (Player) entity;
                if(player.hasPermission("gizmo.immunity")) continue;
                player.damage(0d, item);
                Gizmos.gunGizmo.gifts.add(player.getUniqueId());
                item.remove();
                break;
            }
        }

        if(item.getTicksLived() >= 6000) item.remove();
    }
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:20,代码来源:GunGizmo.java

示例2: openMenu

@EventHandler(priority = EventPriority.HIGHEST)
public void openMenu(final PlayerInteractEvent event) {
    if(event.getAction() == Action.PHYSICAL) return;

    Player player = event.getPlayer();
    if(player.getItemInHand().getType() == Material.GHAST_TEAR) {
        GizmoUtils.openMenu(event.getPlayer());
        purchasingMap.put(event.getPlayer(), null);
    }
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:10,代码来源:Gizmos.java

示例3: getGhastTear

public static ItemStack getGhastTear(Player player, int count) {
    ItemStack raindrops = new ItemStack(Material.GHAST_TEAR);
    ItemMeta meta = raindrops.getItemMeta();
    meta.setDisplayName(ChatColor.AQUA + "Raindrops" + ChatColor.DARK_PURPLE + " | " + ChatColor.WHITE + String.format("%,d", count));
    raindrops.setItemMeta(meta);

    return raindrops;
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:8,代码来源:Utils.java

示例4: meleeEnchantGUI

public static void meleeEnchantGUI(Player player){
    meleeGUI = Bukkit.createInventory(null, 9, ChatColor.DARK_GRAY + "Melee Enchantments");

    ItemStack filler = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 7);
    ItemMeta fillerMeta = filler.getItemMeta();
    fillerMeta.setDisplayName(ChatColor.GRAY + "");
    filler.setItemMeta(fillerMeta);

    ItemStack back = new ItemStack(Material.ARROW);
    ItemMeta backMeta = back.getItemMeta();
    backMeta.setDisplayName(ChatColor.RED + "Previous");
    back.setItemMeta(backMeta);

    ItemStack thunderingStrike = new ItemStack(Material.BLAZE_ROD);
    ItemMeta thunderMeta = thunderingStrike.getItemMeta();
    thunderMeta.setDisplayName(ChatColor.GOLD + "Thundering Strike");
    thunderMeta.setLore(Arrays.asList(ChatColor.GRAY + Main.getEnchantment("Thundering Strike").getDescription(), ChatColor.GRAY + "Rarity: " + Main.getEnchantment("Thundering Strike").getRarity().getName()));
    thunderingStrike.setItemMeta(thunderMeta);

    ItemStack lifeSteal = new ItemStack(Material.FLINT);
    ItemMeta lifeStealMeta = lifeSteal.getItemMeta();
    lifeStealMeta.setDisplayName(ChatColor.RED + "Life Steal");
    lifeStealMeta.setLore(Arrays.asList(ChatColor.GRAY + Main.getEnchantment("Life Steal").getDescription(), ChatColor.GRAY + "Rarity: " + Main.getEnchantment("Life Steal").getRarity().getName()));
    lifeSteal.setItemMeta(lifeStealMeta);

    ItemStack lastHope = new ItemStack(Material.GHAST_TEAR);
    ItemMeta lastHopeMeta = lastHope.getItemMeta();
    lastHopeMeta.setDisplayName(ChatColor.LIGHT_PURPLE + "Last Hope");
    lastHopeMeta.setLore(Arrays.asList(ChatColor.GRAY + Main.getEnchantment("Last Hope").getDescription(), ChatColor.GRAY + "Rarity: " + Main.getEnchantment("Last Hope").getRarity().getName()));
    lastHope.setItemMeta(lastHopeMeta);

    ItemStack EXPSteal = new ItemStack(Material.EXP_BOTTLE);
    ItemMeta EXPStealMeta = EXPSteal.getItemMeta();
    EXPStealMeta.setDisplayName(ChatColor.GREEN + "Experience Steal");
    EXPStealMeta.setLore(Arrays.asList(ChatColor.GRAY + Main.getEnchantment("Experience Steal").getDescription(), ChatColor.GRAY + "Rarity: " + Main.getEnchantment("Experience Steal").getRarity().getName()));
    EXPSteal.setItemMeta(EXPStealMeta);

    meleeGUI.setItem(0, filler);
    meleeGUI.setItem(1, thunderingStrike);
    meleeGUI.setItem(2, filler);
    meleeGUI.setItem(3, lifeSteal);
    meleeGUI.setItem(4, filler);
    meleeGUI.setItem(5, lastHope);
    meleeGUI.setItem(6, filler);
    meleeGUI.setItem(7, EXPSteal);
    meleeGUI.setItem(8, back);

    player.openInventory(meleeGUI);
}
 
开发者ID:Warvale,项目名称:Scorch,代码行数:49,代码来源:EnchantsCommand.java

示例5: Rifle

public Rifle(){
    super(2, Material.GHAST_TEAR, "BALAS DE FUSÍL", "Munición de calibre medio, usado para fusiles.");
}
 
开发者ID:cadox8,项目名称:WC,代码行数:3,代码来源:Rifle.java

示例6: isBrewingIngredient

private static boolean isBrewingIngredient(ItemStack item) {
	if (item.getType() == Material.NETHER_STALK) {
		return true;
	}
	if (item.getType() == Material.SPECKLED_MELON) {
		return true;
	}
	if (item.getType() == Material.GHAST_TEAR) {
		return true;
	}
	if (item.getType() == Material.RABBIT_FOOT) {
		return true;
	}
	if (item.getType() == Material.BLAZE_POWDER) {
		return true;
	}
	if (item.getType() == Material.SPIDER_EYE) {
		return true;
	}
	if (item.getType() == Material.SUGAR) {
		return true;
	}
	if (item.getType() == Material.MAGMA_CREAM) {
		return true;
	}
	if (item.getType() == Material.GLOWSTONE_DUST) {
		return true;
	}
	if (item.getType() == Material.REDSTONE) {
		return true;
	}
	if (item.getType() == Material.FERMENTED_SPIDER_EYE) {
		return true;
	}
	if (item.getType() == Material.GOLDEN_CARROT) {
		return true;
	}
	if (item.getType() == Material.RAW_FISH && item.getData().getData() == 3) {
		return true;
	}
	if (item.getType() == Material.SULPHUR) {
		return true;
	}
	return false;
}
 
开发者ID:RoboTricker,项目名称:Transport-Pipes,代码行数:45,代码来源:BrewingStandContainer.java


注:本文中的org.bukkit.Material.GHAST_TEAR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。