當前位置: 首頁>>代碼示例>>Java>>正文


Java Material.BLAZE_ROD屬性代碼示例

本文整理匯總了Java中org.bukkit.Material.BLAZE_ROD屬性的典型用法代碼示例。如果您正苦於以下問題:Java Material.BLAZE_ROD屬性的具體用法?Java Material.BLAZE_ROD怎麽用?Java Material.BLAZE_ROD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.bukkit.Material的用法示例。


在下文中一共展示了Material.BLAZE_ROD屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onClick

@SuppressWarnings("deprecation")
@EventHandler
public void onClick(PlayerInteractEvent e) {
	if(e.getAction() == Action.PHYSICAL) return;
    KingdomFactionsPlayer p = PlayerModule.getInstance().getPlayer(e.getPlayer());
    if(p.getPlayer().getInventory() == null) return;
    if(p.getPlayer().getItemInHand() == null) return;
    if(p.getPlayer().getItemInHand().getType() != Material.BLAZE_ROD) return;
    if(!p.getPlayer().getItemInHand().hasItemMeta()) return;
    if(!p.getPlayer().getItemInHand().getItemMeta().getDisplayName().equals(ChatColor.RED + "Empire Wand")) return;
	e.setCancelled(true);
	if(e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK) { 
		if(p.hasCooldown(CooldownType.WAND)) {
			p.sendMessage(ChatColor.GOLD + "[" + ChatColor.GRAY + "X" + ChatColor.GOLD + "] "
					+ "Je moet nog " + ChatColor.GRAY + p.getCooldown(CooldownType.WAND).getCooldown() + " seconde(n)" + ChatColor.GOLD + " wachten!");
			return;
		}
			if(p.getSpell() == null) {
			p.setSpell(SpellModule.getInstance().getSpell("Spark"));
		}
       p.getSpell().execute(p);
       p.addCooldown(new Cooldown(CooldownType.WAND, p, 60));
	} else if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
		p.rotateSpells();
	}
}
 
開發者ID:ThEWiZ76,項目名稱:KingdomFactions,代碼行數:26,代碼來源:EmpireWandInteractEventListener.java

示例2: getEmpireWand

public ItemStack getEmpireWand() {

	
		ItemStack empirewand = new ItemStack(Material.BLAZE_ROD, 1);
		ItemMeta meta = empirewand.getItemMeta();
		meta.setDisplayName(ChatColor.RED + "Empire Wand");
		ArrayList<String> lore = new ArrayList<String>();
		try {
			lore.add(ChatColor.translateAlternateColorCodes('&', new Randomizer<String>(KingdomFactionsPlugin.getInstance()
							.getDataManager().getArrayData("Empirewand.lores").getValue()).result()));
		} catch (DataException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		meta.setLore(lore);
		meta.addEnchant(Enchantment.LURE, 1, true);
		meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
		empirewand.setItemMeta(meta);
		
		return empirewand;
	}
 
開發者ID:ThEWiZ76,項目名稱:KingdomFactions,代碼行數:21,代碼來源:EmpireWandModule.java

示例3: register

public void register() {
    ItemStack selector = new ItemStack(Material.BLAZE_ROD);
    ItemMeta im = selector.getItemMeta();
    im.setDisplayName("§a火球術");
    selector.setItemMeta(im);
    this.setSelector(selector);
    ItemStack show = new ItemStack(Material.BLAZE_ROD);
    im = show.getItemMeta();
    im.setDisplayName("§a火球術§7(右鍵使用)");
    show.setItemMeta(im);
    this.setShow(show);
    this.setSkillType(SkillType.ITEM);
    Bukkit.getPluginManager().registerEvents(this, Main.getInstance());
    SkillManager.getInstance().register(this);
}
 
開發者ID:Soldier233,項目名稱:ArchersBattle,代碼行數:15,代碼來源:FireBall.java

示例4: openStatsGUI

public void openStatsGUI(Player p){
 inv = Bukkit.createInventory(null, 27, ChatColor.DARK_GRAY + "Stats");
 /*List<String> armamentLore = new ArrayList();
 armamentLore.add(ChatColor.BLUE + "Level: "+ ChatColor.GREEN + getArmamentHakiLevel(p.getName()));
 armamentLore.add(ChatColor.BLUE + "XP: " + ChatColor.GREEN + getArmamentHakiXP(p.getName()));
 armamentLore.add(ChatColor.BLUE + "XP Needed: " + ChatColor.GREEN +  ((armamentHakiLevels[getArmamentHakiLevel(p.getName()) + 1])- (getArmamentHakiXP(p.getName()))));
 
 List<String> observationLore = new ArrayList();
 observationLore.add(ChatColor.BLUE + "Level: "+ ChatColor.GREEN + getObservationHakiLevel(p.getName()));
 observationLore.add(ChatColor.BLUE + "XP: " + ChatColor.GREEN + getObservationHakiXP(p.getName()));
 observationLore.add(ChatColor.BLUE + "XP Needed: " + ChatColor.GREEN +  ((armamentHakiLevels[getObservationHakiLevel(p.getName()) + 1])- (getObservationHakiXP(p.getName()))));
 
 List<String> conquerorLore = new ArrayList();
 conquerorLore.add(ChatColor.BLUE + "Level: "+ ChatColor.GREEN + getConquerorHakiLevel(p.getName()));
 conquerorLore.add(ChatColor.BLUE + "XP: " + ChatColor.GREEN + getConquerorHakiXP(p.getName()));
 conquerorLore.add(ChatColor.BLUE + "XP Needed: " + ChatColor.GREEN +  ((armamentHakiLevels[getConquerorHakiLevel(p.getName()) + 1])- (getConquerorHakiXP(p.getName()))));
 */
 ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.PLAYER.ordinal());
 ItemStack className = new ItemStack(Material.BOOK);
 ItemMeta classNameMeta = className.getItemMeta();
 ItemStack kills = new ItemStack(Material.IRON_SWORD);
 ItemMeta killsMeta = kills.getItemMeta();
 ItemStack deaths = new ItemStack(Material.BONE);
 ItemMeta deathsMeta = deaths.getItemMeta();
 ItemStack armament = new ItemStack(Material.IRON_INGOT);
 ItemMeta armamentMeta = armament.getItemMeta();
 ItemStack observation = new ItemStack(Material.NETHER_STAR);
 ItemMeta observationMeta = observation.getItemMeta();
 ItemStack conqueror = new ItemStack(Material.BLAZE_ROD);
 ItemMeta conquerorMeta = observation.getItemMeta();

 SkullMeta skullMeta = (SkullMeta) skull.getItemMeta();
 skullMeta.setOwner(p.getName());
 skullMeta.setDisplayName(ChatColor.GOLD + p.getName() + "'s Stats");
 skull.setItemMeta(skullMeta);
 
 classNameMeta.setDisplayName(ChatColor.GOLD + "Class: " + ChatColor.BLUE + Datafiles.getClass(p.getName()));
 className.setItemMeta(classNameMeta);
 
 killsMeta.setDisplayName(ChatColor.GOLD + "Kills: " + ChatColor.BLUE + Datafiles.getKills(p.getName()));
 kills.setItemMeta(killsMeta);
 
 deathsMeta.setDisplayName(ChatColor.GOLD + "Deaths: " + ChatColor.BLUE + Datafiles.getDeaths(p.getName()));
 deaths.setItemMeta(deathsMeta);
 
 
 armamentMeta.setDisplayName(ChatColor.GOLD + "Armament Haki");
// armamentMeta.setLore(armamentLore);
 armament.setItemMeta(armamentMeta);
 
 observationMeta.setDisplayName(ChatColor.GOLD + "Observation Haki");
 //observationMeta.setLore(observationLore);
 observation.setItemMeta(observationMeta);
 
 conquerorMeta.setDisplayName(ChatColor.GOLD + "Conqueror Haki");
 // conquerorMeta.setLore(conquerorLore);
 conqueror.setItemMeta(conquerorMeta);
 
 inv.setItem(0, skull);
 inv.setItem(9, className);
 inv.setItem(4, kills);
 inv.setItem(13, deaths);
 inv.setItem(8, armament);
 inv.setItem(17, observation);
 inv.setItem(26, conqueror);

 
 p.openInventory(inv);
}
 
開發者ID:MohibMirza,項目名稱:RPGPlus,代碼行數:69,代碼來源:StatsGUI.java

示例5: openJoinGUI

public static void openJoinGUI(Player p) {
	inv = Bukkit.createInventory(null, 27, title);
	List<String> WizardLore = new ArrayList<String>();
	
	
	List<String> SwordsmanLore = new ArrayList<String>();

	
	List<String> ArcherLore = new ArrayList<String>();
	
	
	List<String> TopLore = new ArrayList<String>();


	ItemStack WizardChoose = new ItemStack(Material.BLAZE_ROD);
	ItemMeta WizardMeta = WizardChoose.getItemMeta();
	ItemStack SwordsmanChoose = new ItemStack(Material.IRON_SWORD);
	ItemMeta SwordsmanMeta = SwordsmanChoose.getItemMeta();
	ItemStack ArcherChoose = new ItemStack(Material.BOW);
	ItemMeta ArcherMeta = ArcherChoose.getItemMeta();
	ItemStack Top = new ItemStack(Material.WRITTEN_BOOK);
	ItemMeta TopMeta = Top.getItemMeta();
	

	WizardMeta.setDisplayName(Main.colorThis("&9Wizard"));
	WizardMeta.setLore(WizardLore);
	WizardChoose.setItemMeta(WizardMeta);
	
	TopMeta.setDisplayName(Main.colorThis("&c&lRealm of Mythos"));

	SwordsmanMeta.setDisplayName(Main.colorThis("&4Swordsman"));
	SwordsmanMeta.setLore(SwordsmanLore);
	SwordsmanChoose.setItemMeta(SwordsmanMeta);
	ArcherMeta.setDisplayName(Main.colorThis("&cArcher"));
	ArcherMeta.setLore(ArcherLore);
	ArcherChoose.setItemMeta(ArcherMeta);
	TopMeta.setLore(TopLore);
	Top.setItemMeta(TopMeta);
	
	inv.setItem(4, Top);
	inv.setItem(12, WizardChoose);
	inv.setItem(13, SwordsmanChoose);
	inv.setItem(14, ArcherChoose);
	ItemStack block = new ItemStack(Material.STAINED_GLASS_PANE);
	block.getItemMeta().setDisplayName("");
	
	for(int i = 0; i < 27; i++){
		if(i == 4 || i == 12 || i == 13 || i == 14){
			
		}else{
			inv.setItem(i, block);
		}
	}

	p.openInventory(inv);
}
 
開發者ID:MohibMirza,項目名稱:RPGPlus,代碼行數:56,代碼來源:JoinGUI.java

示例6: 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

示例7: EmpireWandShopItem

public EmpireWandShopItem() {
	super(Material.BLAZE_ROD, (short) 0, 1, 100000, 0, ChatColor.RED + "Empire Wand", new ArrayList<String>(), true, "", "", -1, "");
}
 
開發者ID:ThEWiZ76,項目名稱:KingdomFactions,代碼行數:3,代碼來源:EmpireWandShopItem.java


注:本文中的org.bukkit.Material.BLAZE_ROD屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。