Package org.bukkit.inventory

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


    // find all shovel items, if there are more than one to be removed
    for (int i = 0; i < shovelItem.getAmount(); i++) {
      int indexFound = -1; // keeps found shovels
      short durability = Short.MIN_VALUE; // keeps status of worst shovel found
      // get all possible shovel items
      for (Integer index : inventory.all(shovelMaterial).keySet()) {
        ItemStack current = inventory.getItem(index);
        short currentDurability = current.getDurability();
        if (currentDurability > durability) { // is this the worst shovel found?
          indexFound = index;
          durability = currentDurability;
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.