Package com.bergerkiller.bukkit.common.inventory

Examples of com.bergerkiller.bukkit.common.inventory.InventoryBaseImpl


    ItemStack item = null;
    if (member.getEntity().hasPlayerPassenger()) {
      item = member.getPlayerInventory().getItemInHand();
    }
    if (LogicUtil.nullOrEmpty(item)) {
      return new InventoryBaseImpl(new org.bukkit.inventory.ItemStack[0]);
    } else {
      return new InventoryBaseImpl(new org.bukkit.inventory.ItemStack[] {item});
    }
  }
View Full Code Here


        if (!LogicUtil.nullOrEmpty(item)) {
          items.add(item);
        }
      }
    }
    return new InventoryBaseImpl(items, false);
  }
View Full Code Here

   * @param from ItemStack source array
   * @param to ItemStack destination array
   * @return True if full transfer was possible, False if not
   */
  public static boolean canTransferAll(org.bukkit.inventory.ItemStack[] from, org.bukkit.inventory.ItemStack[] to) {
    Inventory invto = new InventoryBaseImpl(to, true);
    for (org.bukkit.inventory.ItemStack item : cloneItems(from)) {
      transfer(item, invto, Integer.MAX_VALUE);
      if (!LogicUtil.nullOrEmpty(item)) {
        return false;
      }
View Full Code Here

TOP

Related Classes of com.bergerkiller.bukkit.common.inventory.InventoryBaseImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.