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


Java Skeleton.getEquipment方法代码示例

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


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

示例1: createRobot

import org.bukkit.entity.Skeleton; //导入方法依赖的package包/类
private void createRobot(Skeleton s) {
	EntityEquipment e = s.getEquipment();
	e.setHelmet(new ItemStack(Material.DISPENSER, 1));
	e.setChestplate(new ItemStack(Material.IRON_CHESTPLATE, 1));
	e.setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS, 1));
	e.setLeggings(new ItemStack(Material.IRON_BOOTS, 1));
	e.setItemInMainHand(new ItemStack(Material.BOW, 1));
	permaVanish(s);
}
 
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:10,代码来源:EntityListener.java

示例2: DroneShocktroop

import org.bukkit.entity.Skeleton; //导入方法依赖的package包/类
public DroneShocktroop(Player target){
	this.target = target;
	Location l = getSafeLocationNearTarget();
	if(l == null) l = target.getLocation();
	mySkeleton = (Skeleton) target.getWorld().spawnEntity(l, EntityType.SKELETON);
	target.playSound(mySkeleton.getLocation(), Sound.PORTAL_TRAVEL, 2.0F, 2.0F);
	mySkeleton.setCustomName("Skywatch Shock Trooper");
	mySkeleton.setCustomNameVisible(true);
	EntityEquipment e = mySkeleton.getEquipment();
	ItemStack hat = new ItemStack(Material.DISPENSER, 1);
	ItemStack chest = new ItemStack(Material.DIAMOND_CHESTPLATE, 1);
	ItemStack leggings = new ItemStack(Material.DIAMOND_LEGGINGS, 1);
	ItemStack boots = new ItemStack(Material.DIAMOND_BOOTS, 1);
	chest.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, SQSkywatch.protectionLevel);
	leggings.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, SQSkywatch.protectionLevel);
	boots.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, SQSkywatch.protectionLevel);
	e.setHelmet(hat);
	e.setChestplate(chest);
	e.setLeggings(leggings);
	e.setBoots(boots);
	

	ItemStack bow = new ItemStack(Material.BOW, 1);
	bow.addEnchantment(Enchantment.ARROW_DAMAGE, SQSkywatch.powerLevel);
	bow.addEnchantment(Enchantment.ARROW_KNOCKBACK, SQSkywatch.knockbackLevel);
	if(SQSkywatch.flameBows){
		bow.addEnchantment(Enchantment.ARROW_FIRE, 1);
	}
	e.setItemInHand(bow);
	mySkeleton.setTarget(target);
	mySkeleton.getWorld().playEffect(mySkeleton.getLocation(), Effect.ENDER_SIGNAL, 0);
}
 
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:33,代码来源:DroneShocktroop.java


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