So I have this code that uses the PlayerInteractWithEntityAfterEvent but when a player interacts with an entity while having an empty hand it'll be read as undefined itemStack and throws an error. Is there a way to overcome this?
Content log error:
[Scripting][error]-TypeError: cannot read property 'typeId' of undefined at <anonymous> (entry.js:169)