ItemLore help

Discussion in 'Plugin Development' started by MarckF, Aug 28, 2015.

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

    MarckF

    Hi everyone, I have been trying to add a lore to a Diamond sword so when a player kills an other player with it it will add a Lore "{Kills: 1}". Also im trying that when a player kills an other player with the same sword it will add the kill so the lore would be "{Kills: 2}"
    I know this is with a string or with a json, but im not getting how to do it, could anyone help me?

    This is what i gotta
    http://pastebin.com/wiVGTitF

    *Also I have made it so it adds a lore of the player that has crafted the sword and the date :), but im having trouble with this
     
  2. Offline

    teej107

    @MarckF Get the item lore and check each of its contents to see if it starts with {Kills:
    Then get the last characters minus the last parentheses and parse it to an int. Does this get you in the right direction?
     
  3. Offline

    blackpoiso

    I think this would need to use a config. Where when they kill a player, it updates in the config. Then sets the lore to what the kills string/int in the config is
     
  4. @blackpoiso That could be really intensive if multiple deaths are happening, it would be setting and saving every death and it just wouldn't work well.


    @MarckF Follow what @teej107 said.
     
  5. Offline

    teej107

    It won't be that intensive. Just kind of unnecessary.
     
Thread Status:
Not open for further replies.

Share This Page