Examples of containsEnchantment()


Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

        } else {
          LogHelper.showInfo("enchantNotFound", sender, ChatColor.RED);
          return true;
        }
       
        if (!inHand.containsEnchantment(ench)){
          LogHelper.showInfo("enchantRemoveNotFound#####[" + ChatColor.GOLD + Utils.userFriendlyNames(inHand.getType().name()), sender);
          return true;
        }
       
        inHand.removeEnchantment(ench);
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

      if (size < 1) {
        continue;
      }
      Enchantment ench = eStack.get(plugin.getSingleRandom()
          .nextInt(size));
      if (!tool.containsEnchantment(ench))
        if ((lvl != 0) && (ench != null)
            && !tier.getColor().equals(ChatColor.MAGIC))
          if (safe) {
            if ((lvl >= ench.getStartLevel())
                && (lvl <= ench.getMaxLevel())) {
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

      if (size < 1) {
        continue;
      }
      Enchantment ench = eStack.get(plugin.getSingleRandom()
          .nextInt(size));
      if (!tool.containsEnchantment(ench))
        if ((lvl != 0) && (ench != null)
            && !tier.getColor().equals(ChatColor.MAGIC))
          if (safe) {
            if ((lvl >= ench.getStartLevel())
                && (lvl <= ench.getMaxLevel())) {
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

      if (size < 1) {
        continue;
      }
      Enchantment ench = eStack.get(plugin.getSingleRandom()
          .nextInt(size));
      if (!ci.containsEnchantment(ench))
        if ((lvl != 0) && (ench != null)
            && !tier.getColor().equals(ChatColor.MAGIC))
          if (safe) {
            if ((lvl >= ench.getStartLevel())
                && (lvl <= ench.getMaxLevel())) {
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

      if (size < 1) {
        continue;
      }
      Enchantment ench = eStack.get(plugin.getSingleRandom()
          .nextInt(size));
      if (!tool.containsEnchantment(ench))
        if ((lvl != 0) && (ench != null)
            && !tier.getColor().equals(ChatColor.MAGIC))
          if (safe) {
            if ((lvl >= ench.getStartLevel())
                && (lvl <= ench.getMaxLevel())) {
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

      if (size < 1) {
        continue;
      }
      Enchantment ench = eStack.get(plugin.getSingleRandom()
          .nextInt(size));
      if (!tool.containsEnchantment(ench))
        if ((lvl != 0) && (ench != null)
            && !tier.getColor().equals(ChatColor.MAGIC))
          if (safe) {
            if ((lvl >= ench.getStartLevel())
                && (lvl <= ench.getMaxLevel())) {
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

                    blockState.update(true);
                    event.setCancelled(true);
                }
            }
        }
        else if (ItemUtils.isPickaxe(heldItem) && !heldItem.containsEnchantment(Enchantment.SILK_TOUCH)) {
            SmeltingManager smeltingManager = UserManager.getPlayer(player).getSmeltingManager();

            if (smeltingManager.canUseFluxMining(blockState)) {
                if (smeltingManager.processFluxMining(blockState)) {
                    blockState.update(true);
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

            return;
        }

        ItemStack bow = event.getBow();

        if (bow != null && bow.containsEnchantment(Enchantment.ARROW_INFINITE)) {
            projectile.setMetadata(mcMMO.infiniteArrowKey, mcMMO.metadataValue);
        }

        projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, Math.min(event.getForce() * AdvancedConfig.getInstance().getForceMultiplier(), 1.0)));
        projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, projectile.getLocation()));
View Full Code Here

Examples of org.bukkit.inventory.ItemStack.containsEnchantment()

    private float calculateRollXP(double damage, boolean isRoll) {
        ItemStack boots = getPlayer().getInventory().getBoots();
        float xp = (float) (damage * (isRoll ? Acrobatics.rollXpModifier : Acrobatics.fallXpModifier));

        if (boots != null && boots.containsEnchantment(Enchantment.PROTECTION_FALL)) {
            xp *= Acrobatics.featherFallXPModifier;
        }

        return xp;
    }
View Full Code Here

Examples of org.getspout.spoutapi.inventory.SpoutItemStack.containsEnchantment()

  }

  @EventHandler(priority = EventPriority.LOWEST)
  public void onPlayerDrop(PlayerDropItemEvent e) {
    SpoutItemStack sis = new SpoutItemStack(e.getItemDrop().getItemStack());
    if (!sis.containsEnchantment(SpoutEnchantment.UNSTACKABLE) && sis.isCustomItem()) {
      CustomItem ci = (CustomItem)sis.getMaterial();
      if (!ci.isStackable()) {
        sis.addEnchantment(SpoutEnchantment.UNSTACKABLE, 1000);
      }
    }
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.