How can I make item stats? It counts how many kills every sword has, so like its the item that has status. I tried setting lore (the kills)to the item in hand but it don't go as expected.
You can create an id for each sword when someone gets one and then check the id of sword on your data, when someone kills with those sword it gives one more point for that sword, to display the kills of a sword just send it with sendTip or sendPopup, simple!
I think you can use setNamedTag() with nbt tag, im not good on this but i think you can make something like that -> PHP: $kills = new IntTag("Kills", 12); //kills$nbt = new CompoundTag("stats", [$kills]);$item->setNamedTag($nbt);
Ya but I think u can get name tag by this not sure PHP: $kills = new IntTag("Kills", 12);$nbt = new CompoundTag("stats", [$kills]);$item->getNamedTag($nbt);