Package org.bukkit.inventory

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


            if (playerInv.getHelmet() == null || playerInv.getHelmet().getType() != Material.LEATHER_HELMET) {
              playerInv.setHelmet(team.getKind().getHat());
            }
           
            // 2) Get rid of extra blocks in inventory: only keep one
            HashMap<Integer, ? extends ItemStack> blocks = playerInv.all(teamBlockMaterial);
            if (blocks.size() > 1 || (blocks.size() == 1 && blocks.get(blocks.keySet().iterator().next()).getAmount() > 1)) {
              int i = 0;
              int removed = 0;
              for (ItemStack item : playerInv.getContents()) {
                // remove only same colored wool
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.