當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。