Package org.bukkit.inventory

Examples of org.bukkit.inventory.Inventory.removeItem()


                                    } else {
                                        iter.remove();
                                        items.add(new Tuple2<ItemInfo, Integer>(inf.a, inf.b - stack.getAmount()));
                                    }
                                    transferItems.add(stack.clone());
                                    cartinventory.removeItem(stack);
                                }
                            }
                        }
                    }
                }
View Full Code Here


    Inventory inv = ((InventoryHolder) block.getState()).getInventory();
    List<HashMap<String,Integer>> ops = InventoryUtil.interpretDifferenceString(data);
    //Handle the additions
    if (ops.size() > 0) {
      for (ItemStack stack : InventoryUtil.uncompressInventory(ops.get(0)))
        inv.removeItem(stack);
    }
    //Handle subtractions
    if (ops.size() > 1) {
      for (ItemStack stack : InventoryUtil.uncompressInventory(ops.get(1)))
        inv.addItem(stack);
View Full Code Here

        inv.addItem(stack);
    }
    //Handle subtractions
    if (ops.size() > 1) {
      for (ItemStack stack : InventoryUtil.uncompressInventory(ops.get(1)))
        inv.removeItem(stack);
    }
    return true;
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.