Package org.bukkit.inventory

Examples of org.bukkit.inventory.PlayerInventory.first()


   
    PlayerInventory inventory = player.getInventory();
    boolean itemConsumed = false;
   
   
    int idx = inventory.first(itemID);
   
    if (idx >= 0) {
      ItemStack toConsume = inventory.getItem(idx);
      int amt = toConsume.getAmount();
      if (amt > 0) {
View Full Code Here


            addEnchants(item);
        }

        // Remove the item
        if (repairMaterialMetadata == -1) {
            toRemove = inventory.getItem(inventory.first(repairMaterial)).clone();
            toRemove.setAmount(1);
        }

        inventory.removeItem(toRemove);
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.