Examples of canEnchantItem()


Examples of org.bukkit.enchantments.Enchantment.canEnchantItem()

    if (inHand.getType().equals(Material.AIR)){
      LogHelper.showInfo("enchantFist", sender, ChatColor.RED);
      return true;
    }
   
    if (!ench.canEnchantItem(inHand) && !unSafe){
      LogHelper.showInfo("enchantNotSafe", sender, ChatColor.RED);
      return true;
    }
   
    if (nonNumeric){
View Full Code Here

Examples of org.bukkit.enchantments.Enchantment.canEnchantItem()

                    sender.sendMessage(String.format("Enchantment does not exist: %s", args[1]));
                else {
                    String enchantmentName = enchantment.getName().replaceAll("_", " ");
                    enchantmentName = WordUtils.capitalizeFully(enchantmentName);

                    if (!force && !enchantment.canEnchantItem(item)) {
                        sender.sendMessage(String.format("%s cannot be applied to %s", enchantmentName, itemName));
                    } else {
                        int level = 1;
                        if (args.length > 2) {
                            Integer integer = getInteger(args[2]);
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.