Reputation: 507
I tried to hide an Entity
(ArmorStand
) for some Players. Is there a Method like for Players (Player1.hidePlayer(Player2);
)?
Upvotes: 4
Views: 6156
Reputation: 1
You can use protocollib and send PacketPlayOutEntityDestroy packet to the player( If the player rejoin or moves far from the entity and back again you should send the packet again ) And for showing just fiew players the entity you can send PacketPlayOutSpawnEntityLiving packet to those players
Upvotes: 0
Reputation: 21
I personally would suggest utilizing packet manipulation to do this. Specifically using a destroy packet as well as cancelling any ping packets sent to the player. I'm not sure if it's still a thing but we used to abuse this to determine what admins were online and in vanish because even though Bukkit/Spigot sent the destroy we continued to receive pings from the player to update them on the scoreboard even if they weren't present on the scoreboard. Big tell.
Also in reference to the "ping" packet I'm referring to I believe Entity Status with a certain code.
Upvotes: 2