RemoteBaseEntity.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:remote-entities-nxt 作者:
/**
 * 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());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号