Discussion in 'Plugin Development' started by MinecraftMart, Jun 6, 2015.
If i make an itemstack, how would i set its weapon damage?
I Actually ment weapon damage
Depending on what you mean, there are several ways to set the damage. You could add the sharpness enchantment, but I am assuming you don't want to do that. You could check the item meta/lore on an EntityDamageByEntity event, and if it equals something, you can set the damage to more or less.
So I cant set the actual damage that is displayed underneath the weapon? Well id have to try the other way then, thanks.
Save the data somewhere of how much damage it should give (ItemMeta, Config, Map), and call the onEntityDamageByEntity event and check if the item has that data.
@MinecraftMart You can clear the lore of the item, and set the damage in the lore with a custom lore, then read that line of lore when setting the damage.
Separate names with a comma.