[Minecraft 1.14.4]
I want to check when a player hits a village bell in minecraft, and then perform some action.
After reading a bit on the minecraft wiki, it seems that bells have a block Entity Data entry named "keepPacked" that should be set to 1 if the bell is swaying (has been hit) or 0 if it's stationary.
I'm not sure how to access this data, or if this is even possible.
Best Answer
You can create a scoreboard objective to detect when a player rings a bell, the command to create the scoreboard objective looks like this:
The score for a player increases by one every time that player rings a bell.