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
@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?
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
@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.