title: How to set a single entity invisible to a player?
body: <p>After much research and much time wasted, I still can't find out how to hide an entity to a player.</p>
  
  <p>What I'm trying to do is create a disguise command. I've now gotten everything worked out, except the issue is that the entity is still visible, and once stationary you can't interact with anything because the mob's hitbox is in the way. I want to hide the entity from the player so that you can do this. I know with players you can use Player#hidePlayer(), but this does not work with entities. I've tried using solutions such as <a href="https://bukkit.org/threads/entity-shown-only-to-specific-player-s.155715/" rel="nofollow noreferrer">this</a>, but it gave an error while following the example. (And many things were depreciated, so I assumed it was out of date. I'm using Spigot 1.11.2). Any help would be very much appreciated.</p>
  
  <p>PS: If you're wondering why I don't just use an already made plugin, it's because none of them work from what I've found.</p>