当前位置: 首页>>代码示例>>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;未经允许,请勿转载。