Examples of VanillaItemMaterial


Examples of org.spout.vanilla.material.item.VanillaItemMaterial

      // Check if this weapon deals more damage
      if (!equip && (item.getItemStack().getMaterial() instanceof VanillaItemMaterial || inv.getHeldItem() == null)) {
        if (inv.getHeldItem() == null) {
          equip = true;
        } else if (inv.getHeldItem().getMaterial() instanceof VanillaItemMaterial) {
          VanillaItemMaterial itemMaterial = (VanillaItemMaterial) item.getItemStack().getMaterial();
          VanillaItemMaterial equipMaterial = (VanillaItemMaterial) inv.getHeldItem().getMaterial();
          if (equipMaterial.getDamage() < itemMaterial.getDamage()) {
            equip = true;
          } else if (itemMaterial.getDamage() == equipMaterial.getDamage() && itemMaterial instanceof Tool && equipMaterial instanceof Tool
              && inv.getHeldItem().getData() > item.getItemStack().getData()) {
            equip = true;
          }
        }
        if (equip) {
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.