https://mclo.gs/pMIMDqI
Using this setup:
Events:
lootGenerateEvent1:
type: custom
custom_event_data:
event: org.bukkit.event.world.LootGenerateEvent
player_variable: getEntity()
actions:
default:
- 'call_event: testCall1'
testCall1:
type: call
actions:
default:
- 'to_range: 32;true: actionbar: Test;200'
When setting a Decorated Pot with the following command and breaking it: /setblock ~ ~ ~ decorated_pot{LootTable:"chests/end_city_treasure"} replace, potentially because the getEntity() returns null when decorated pots generate loot tables compared to chests.
The decorated pot only has a chest loot table for demonstration purposes. They usually use different loot tables.
I'm using this somewhat strange setup because it was the only way I could make an action bar appear within a range of a player.
The getEntity() method returns null for the decorated pot which it doesn't for other containers like chests, so I am assuming that's the reason but I'll leave the rest to you 🫡