#PlayerInteractEntityEvent & ItemFrames

1 messages · Page 1 of 1 (latest)

hearty hawk
#
  1. I am doing entity tracking too (meaning that i cache entities when they load/spawn, and uncache when they unload)
    So on the server startup, I would like to track all entities that world has generated so far. What event should I use for that? onEnable? (i'm already tracking on EntitiesLoad/UnloadEvent & EntitySpawnEvent)
severe zodiac
#

just as a quick test, I outputted the item's rotation before and 1 tick after, you're correct. it's before the actual interaction happens

#

however, adding items, you would use PlayerInteractEntityEvent.

for removing items, the player has to technically "attack" the item frame, so you would want to use EntityDamageByEntityEvent and check which entity gets damaged