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


Java Material.GOLD_BOOTS属性代码示例

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


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

示例1: isApplicableFor

@Override
public boolean isApplicableFor(Player player) {
    ItemStack helmet = player.getInventory().getHelmet();
    if (helmet == null || helmet.getType() != Material.GOLD_HELMET)
        return false;

    ItemStack chestplate = player.getInventory().getChestplate();
    if (chestplate == null || chestplate.getType() != Material.GOLD_CHESTPLATE)
        return false;

    ItemStack leggings = player.getInventory().getLeggings();
    if (leggings == null || leggings.getType() != Material.GOLD_LEGGINGS)
        return false;

    ItemStack boots = player.getInventory().getBoots();
    return !(boots == null || boots.getType() != Material.GOLD_BOOTS);
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:17,代码来源:BardClass.java

示例2: setupEditMenu

public static void setupEditMenu(Player player) {
	Inventory inv = Bukkit.createInventory(player, Convert.getInventorySize(plugin.getChallengesFile().getChallengesAmount()), ChatColor.BOLD + "Edit Challenge");
	for(int i = 1; i <= plugin.getChallengesFile().getChallengesAmount(); i++){
		Material mat;
		if(plugin.getChallengesFile().getType(i).equalsIgnoreCase("parkour")){
			mat = Material.GOLD_BOOTS;
		}
		else if(plugin.getChallengesFile().getType(i).equalsIgnoreCase("maze")){
			mat = Material.TORCH;
		}else{
			mat = Material.GOLD_SWORD;
		}
		inv.addItem(ItemStackGenerator.createItem(mat, 0, 0,
				ChatColor.GRAY + "" + i + Convert.getOrdinalFor(i) + " Challenge", null, true));
	}
	player.openInventory(inv);
}
 
开发者ID:benNek,项目名称:AsgardAscension,代码行数:17,代码来源:MainInventory.java

示例3: isPieceOfArmor

private static boolean isPieceOfArmor(ItemStack stack)
{
    if (stack.getType() == Material.LEATHER_HELMET || stack.getType() == Material.LEATHER_CHESTPLATE || stack.getType() == Material.LEATHER_LEGGINGS || stack.getType() == Material.LEATHER_BOOTS)
        return true;
    else if (stack.getType() == Material.IRON_HELMET || stack.getType() == Material.IRON_CHESTPLATE || stack.getType() == Material.IRON_LEGGINGS || stack.getType() == Material.IRON_BOOTS)
        return true;
    else if (stack.getType() == Material.CHAINMAIL_HELMET || stack.getType() == Material.CHAINMAIL_CHESTPLATE || stack.getType() == Material.CHAINMAIL_LEGGINGS || stack.getType() == Material.CHAINMAIL_BOOTS)
        return true;
    else if (stack.getType() == Material.GOLD_HELMET || stack.getType() == Material.GOLD_CHESTPLATE || stack.getType() == Material.GOLD_LEGGINGS || stack.getType() == Material.GOLD_BOOTS)
        return true;
    else if (stack.getType() == Material.DIAMOND_HELMET || stack.getType() == Material.DIAMOND_CHESTPLATE || stack.getType() == Material.DIAMOND_LEGGINGS || stack.getType() == Material.DIAMOND_BOOTS)
        return true;

    return false;
}
 
开发者ID:SamaGames,项目名称:Hub,代码行数:15,代码来源:PlayerProtectionListener.java

示例4: onCraftItem

@EventHandler(priority = EventPriority.HIGH)
public void onCraftItem(CraftItemEvent event) 
{
	if( event.getRecipe().getResult().getType() == Material.STONE_SWORD
			|| event.getRecipe().getResult().getType() == Material.IRON_SWORD
			|| event.getRecipe().getResult().getType() == Material.GOLD_SWORD
			|| event.getRecipe().getResult().getType() == Material.DIAMOND_SWORD
|| event.getRecipe().getResult().getType() == Material.LEATHER_BOOTS
			|| event.getRecipe().getResult().getType() == Material.LEATHER_LEGGINGS
			|| event.getRecipe().getResult().getType() == Material.LEATHER_CHESTPLATE
			|| event.getRecipe().getResult().getType() == Material.LEATHER_HELMET
|| event.getRecipe().getResult().getType() == Material.CHAINMAIL_BOOTS
			|| event.getRecipe().getResult().getType() == Material.CHAINMAIL_LEGGINGS
			|| event.getRecipe().getResult().getType() == Material.CHAINMAIL_CHESTPLATE
			|| event.getRecipe().getResult().getType() == Material.CHAINMAIL_HELMET
|| event.getRecipe().getResult().getType() == Material.GOLD_BOOTS
			|| event.getRecipe().getResult().getType() == Material.GOLD_LEGGINGS
			|| event.getRecipe().getResult().getType() == Material.GOLD_CHESTPLATE
			|| event.getRecipe().getResult().getType() == Material.GOLD_HELMET
			|| event.getRecipe().getResult().getType() == Material.IRON_BOOTS
			|| event.getRecipe().getResult().getType() == Material.IRON_LEGGINGS
			|| event.getRecipe().getResult().getType() == Material.IRON_CHESTPLATE
			|| event.getRecipe().getResult().getType() == Material.IRON_HELMET
			|| event.getRecipe().getResult().getType() == Material.DIAMOND_BOOTS
			|| event.getRecipe().getResult().getType() == Material.DIAMOND_LEGGINGS
			|| event.getRecipe().getResult().getType() == Material.DIAMOND_CHESTPLATE
			|| event.getRecipe().getResult().getType() == Material.DIAMOND_HELMET)
	{
		if( event.getWhoClicked().getType() == EntityType.PLAYER )
		{
			Player p = (Player)event.getWhoClicked();
			p.sendMessage("Sorry, you are not allowed to craft this item. Purchase it from a Safe Dock instead.");
		}
		event.setCancelled(false);
	}
 
}
 
开发者ID:Maximuspayne,项目名称:NavyCraft2-Lite,代码行数:37,代码来源:NavyCraft_InventoryListener.java

示例5: getTypeMaterial

public Material getTypeMaterial(int challenge) {
	String type = getType(challenge);
	if("parkour".equalsIgnoreCase(type))
		return Material.GOLD_BOOTS;
	else if("maze".equalsIgnoreCase(type))
		return Material.TORCH;
	else return Material.GOLD_SWORD;
}
 
开发者ID:benNek,项目名称:AsgardAscension,代码行数:8,代码来源:ChallengesFile.java

示例6: onInventoryClick

@EventHandler
public void onInventoryClick(InventoryClickEvent event)
{
    if (event.getClickedInventory() != null && event.getCurrentItem() != null)
    {
        if (event.getCurrentItem().getType() == Material.LEATHER_BOOTS || event.getCurrentItem().getType() == Material.IRON_BOOTS || event.getCurrentItem().getType() == Material.CHAINMAIL_BOOTS || event.getCurrentItem().getType() == Material.GOLD_BOOTS || event.getCurrentItem().getType() == Material.DIAMOND_BOOTS)
        {
            if ((event.getClickedInventory().getType() == InventoryType.ENCHANTING || event.getClickedInventory().getType() == InventoryType.ANVIL) && event.getSlot() == 0)
                event.getCurrentItem().removeEnchantment(Enchantment.DEPTH_STRIDER);
            else if (event.getClickedInventory().getType() == InventoryType.ANVIL && event.getSlot() == 2)
                event.getCurrentItem().addEnchantment(Enchantment.DEPTH_STRIDER, 2);
        }
    }
}
 
开发者ID:SamaGames,项目名称:DoubleRunner,代码行数:14,代码来源:DoubleRunnerGameLoop.java

示例7: isDressed

public boolean isDressed(Player p)
{
 if( this.type.canFly )
 {
   if( p.getInventory().getHelmet() != null && p.getInventory().getHelmet().getType() == Material.CHAINMAIL_HELMET )
{
   	if( p.getInventory().getChestplate() != null && p.getInventory().getChestplate().getType() == Material.CHAINMAIL_CHESTPLATE )
	{
   		if( p.getInventory().getLeggings() != null && p.getInventory().getLeggings().getType() == Material.CHAINMAIL_LEGGINGS )
		{
   			if( p.getInventory().getBoots() != null && p.getInventory().getBoots().getType() == Material.CHAINMAIL_BOOTS )
			{
   				return true;
			}	
		}	
	}	
}
   p.sendMessage(ChatColor.RED + "You need to wear pilot (chainmail) uniform to use this.");
   return false;
 }else if( this.type.isTerrestrial)
 {
  if( p.getInventory().getHelmet() != null && p.getInventory().getHelmet().getType() == Material.IRON_HELMET )
{
   	if( p.getInventory().getChestplate() != null && p.getInventory().getChestplate().getType() == Material.IRON_CHESTPLATE )
	{
   		if( p.getInventory().getLeggings() != null && p.getInventory().getLeggings().getType() == Material.IRON_LEGGINGS )
		{
   			if( p.getInventory().getBoots() != null && p.getInventory().getBoots().getType() == Material.IRON_BOOTS )
			{
   				return true;
			}	
		}	
	}	
}
   p.sendMessage(ChatColor.RED + "You need to wear soldier (iron) uniform to use this.");
   return false;  
 }else
 {
  if( p.getInventory().getHelmet() != null && (p.getInventory().getHelmet().getType() == Material.LEATHER_HELMET || p.getInventory().getHelmet().getType() == Material.GOLD_HELMET || p.getInventory().getHelmet().getType() == Material.DIAMOND_HELMET) )
{
   	if( p.getInventory().getChestplate() != null && (p.getInventory().getChestplate().getType() == Material.LEATHER_CHESTPLATE || p.getInventory().getChestplate().getType() == Material.GOLD_CHESTPLATE || p.getInventory().getChestplate().getType() == Material.DIAMOND_CHESTPLATE) )
	{
   		if( p.getInventory().getLeggings() != null && (p.getInventory().getLeggings().getType() == Material.LEATHER_LEGGINGS || p.getInventory().getLeggings().getType() == Material.GOLD_LEGGINGS || p.getInventory().getLeggings().getType() == Material.DIAMOND_LEGGINGS) )
		{
   			if( p.getInventory().getBoots() != null && (p.getInventory().getBoots().getType() == Material.LEATHER_BOOTS || p.getInventory().getBoots().getType() == Material.GOLD_BOOTS || p.getInventory().getBoots().getType() == Material.DIAMOND_BOOTS) )
			{
   				return true;
			}	
		}	
	}	
}
   p.sendMessage(ChatColor.RED + "You need to wear sailor (leather) or captain (gold) uniform to use this.");
   return false;  
 }
}
 
开发者ID:Maximuspayne,项目名称:NavyCraft2-Lite,代码行数:55,代码来源:Craft.java

示例8: registerAbilities

/**
 * Registers all the abilities
 */
private void registerAbilities() {
	abilities = new ArrayList<>();
	Ability ability;
	
	// Haste
	ability = new Ability("Haste", Material.GOLD_BOOTS, 10, 100);
	ability.setItems(Arrays.asList(ItemType.SWORD, ItemType.AXE, ItemType.PICKAXE));
	ability.addDescription(ChatColor.GRAY + "Gives Haste Effect");
	ability.addDescription(ChatColor.GRAY + "Haste Level: " + ChatColor.RED + "I");
	abilities.add(ability);
	
	// Poison
	ability = new Ability("Poison", Material.BEETROOT, 15, 150);
	ability.setItems(Arrays.asList(ItemType.SWORD, ItemType.AXE));
	ability.addDescription(ChatColor.GRAY + "Poisons target enemy");
	ability.addDescription(ChatColor.GRAY + "Poison Level: " + ChatColor.RED + "I");
	ability.addDescription(ChatColor.GRAY + "Poison Duration: " + ChatColor.RED + "3 seconds");
	abilities.add(ability);
	
	// AoE (4 blocks)
	ability = new Ability("AoE", Material.GOLD_PICKAXE, 20, 750);
	ability.setItems(Arrays.asList(ItemType.PICKAXE));
	ability.addDescription(ChatColor.GRAY + "Destroys 4 blocks instead of 1");
	abilities.add(ability);
	
	// Magnet
	ability = new Ability("Magnet", Material.DETECTOR_RAIL, 25, 250);
	ability.setItems(Arrays.asList(ItemType.PICKAXE));
	ability.addDescription(ChatColor.GRAY + "Small chance to get crate key");
	ability.addDescription(ChatColor.GRAY + "Chance: " + ChatColor.RED + "0.01%");
	abilities.add(ability);
	
	// Flame
	ability = new Ability("Flame", Material.BLAZE_POWDER, 15, 750);
	ability.setItems(Arrays.asList(ItemType.SWORD, ItemType.AXE));
	ability.addDescription(ChatColor.GRAY + "Sets target on fire");
	ability.addDescription(ChatColor.GRAY + "Fire Duration: " + ChatColor.RED + "3 seconds");
	abilities.add(ability);
	
	// High Jump
	ability = new Ability("High Jump", Material.ELYTRA, 20, 200);
	ability.setItems(Arrays.asList(ItemType.BOOTS, ItemType.LEGGINGS, ItemType.CHESTPLATE, ItemType.HELMET));
	ability.addDescription(ChatColor.GRAY + "Jump 2 blocks high");
	ability.addDescription(ChatColor.GRAY + "Jump Level: " + ChatColor.RED + "II");
	abilities.add(ability);
	
	// Speed
	ability = new Ability("Speed", Material.FEATHER, 15, 150);
	ability.setItems(Arrays.asList(ItemType.BOOTS, ItemType.LEGGINGS, ItemType.CHESTPLATE, ItemType.HELMET));
	ability.addDescription(ChatColor.GRAY + "Gives speed boost");
	ability.addDescription(ChatColor.GRAY + "Speed Level: " + ChatColor.RED + "I");
	abilities.add(ability);
	
	// Lucky Repair
	ability = new Ability("Lucky Repair", Material.ANVIL, 25, 250);
	ability.setItems(Arrays.asList(ItemType.SWORD, ItemType.AXE, ItemType.PICKAXE));
	ability.addDescription(ChatColor.GRAY + "Small chance to repair item");
	ability.addDescription(ChatColor.GRAY + "Chance: " + ChatColor.RED + "0.01%");
	abilities.add(ability);
}
 
开发者ID:benNek,项目名称:AsgardAscension,代码行数:63,代码来源:AbilityManager.java

示例9: onEnchantItem

@EventHandler
public void onEnchantItem(EnchantItemEvent event)
{
    if (event.getItem().getType() == Material.LEATHER_BOOTS || event.getItem().getType() == Material.IRON_BOOTS || event.getItem().getType() == Material.CHAINMAIL_BOOTS || event.getItem().getType() == Material.GOLD_BOOTS || event.getItem().getType() == Material.DIAMOND_BOOTS)
        event.getItem().addEnchantment(Enchantment.DEPTH_STRIDER, 2);
}
 
开发者ID:SamaGames,项目名称:DoubleRunner,代码行数:6,代码来源:DoubleRunnerGameLoop.java


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