Item stack attack damage?

Discussion in 'Plugin Development' started by PakebolasXGAMERX, Feb 26, 2015.

Thread Status:
Not open for further replies.
  1. hey guys i was wondering about setting damage to item stack can someone helps me :D
    this is my code
    Code:
    f (label.equalsIgnoreCase("test"))
               
                player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 2147483647, 2));
                player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 2147483647, 1));
                player.sendMessage(ChatColor.GRAY + "[" + ChatColor.GREEN + "Weapon" + ChatColor.GRAY + "] " + ChatColor.GRAY + "You have received a test weapon!");
                ItemStack jumper = new ItemStack(Material.IRON_AXE);
                ItemMeta jumpermeta = jumper.getItemMeta();
                jumpermeta.setDisplayName(ChatColor.RED + "Logist");
                jumper.setItemMeta(jumpermeta);
                player.getInventory().addItem(new ItemStack[] { jumper });
     
  2. Offline

    nj2miami

    If you mean the actual damage a weapon/item does then there is no specific way you can do this easily. You will need to modify its attribute, which based on your question (and example above) is probably a little more intense that you can handle.

    However, I am actually creating a small library to do this for developers quite easily which I will be posting to Bukkit in the next couple days. My LIB works on any version MC as well.
     
  3. post it here when it will done
     
Thread Status:
Not open for further replies.

Share This Page