so im trying to make it so when you have a specific item it gives you an attribute value relative to the amount you have of that item. i already have that done but the issue is having it work in multiplayer since it checks for the amount of this item you have every tick and stores it in one data storage, so it jumbles up with other players item count of the same item.
my question is is there any way to detect when a player is given this item in any way (/give or on pickup) so i can only then run the command that stores the item count?