/**
* Copies the inventory from the given player to the inventory of this entity.
*
* @param inPlayer Player to copy inventory from
* @param inIgnoreArmor If armor should not be copied or if it should
*/
public void copyInventory(Player inPlayer, boolean inIgnoreArmor)
{
this.copyInventory(inPlayer.getInventory());
EntityEquipment equip = this.getBukkitEntity().getEquipment();
if(!inIgnoreArmor)
equip.setArmorContents(inPlayer.getInventory().getArmorContents());
if(this.getInventory() instanceof CraftInventoryPlayer)
((CraftInventoryPlayer)this.getInventory()).setHeldItemSlot(inPlayer.getInventory().getHeldItemSlot());
else
equip.setItemInHand(inPlayer.getItemInHand());
}
RemoteBaseEntity.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:remote-entities-nxt
作者:
评论列表
文章目录