Remove duplicate code
Check if inventory actually opened on entity interact
Remove unneeded listener options
Fix comment