Attributes and Modifiers

Discussion in 'Plugin Development' started by Mining4diamonds, Nov 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Mining4diamonds

    So I am fairly new to Java coding. The past month I have spent on watching some tutorials on youtube and making some small little plugins that dont do much. My main goal in all of this was to create a plugin for my server which would change up weapons a little bit.

    Some Examples Of What I Want To Make

    [​IMG][​IMG]

    Anyways I know that there are plugins out there that do things like this. But not doing what I need? my question is exactly how do I go about modifying item damages and then making sure it's listed in the lore in the item.
     
  2. Offline

    AoH_Ruthless

    Mining4diamonds

    Removing the + x damage on a weapon isn't easy because it isn't your normal lore. http://forums.bukkit.org/threads/removing-lores.199979/

    However, you can change the damage, name, and regular lore pretty easily.

    Modifying Damage: In an event, check if an entity was damaged by a weapon, and set their new health to the old health minus an integer.

    Changing Name and Lore: Get the item, then get the itemMeta of the item. Then you can set the name and lore of the item.

    If you have no idea what I'm talking about, see the Bukkit API documentation here, or alternatively, this link may help you.
    PS: One month isn't really enough to get a good enough grasp on Java.
     
Thread Status:
Not open for further replies.

Share This Page