4

I tried to hide an Entity (ArmorStand) for some Players. Is there a Method like for Players (Player1.hidePlayer(Player2);)?

Thank you for your help and sorry for my bad English :)

LeWimbes
  • 517
  • 1
  • 10
  • 25
  • Unfortunately there is no such method for entities in general (that I know of), you'll have to send the client that you don't want seeing the entity an entity destroy packet. – Adrian Sohn Mar 27 '16 at 15:01
  • Okay and can I also send an entity spawn packet or something like that, when I only want to show it to one or two Players? – LeWimbes Mar 27 '16 at 15:17
  • Yeah, that should work! – Adrian Sohn Mar 27 '16 at 15:31
  • Well I tried, but I can't use an `ArmorStand` only an `EntityHuman`... – LeWimbes Mar 27 '16 at 17:43
  • @Nightfighter001 Your using the wrong packet then. Think of this> The server has some classes and such but, the only way the client knows anything is thru packets. So there _**HAS**_ to be a packet to do it. What packet are you trying? – Lightspeed360 Apr 02 '16 at 21:39
  • @Lightspeed360 What you are saying seems to be right :) I use the packet 'PacketPlayOutNamedEntitySpawn'. – LeWimbes Apr 02 '16 at 22:13
  • 1
    @Nightfighter001 Thats used to spawn a player! Try this [clickme](http://wiki.vg/Protocol#Spawn_Mob) Try: PacketPlayOutSpawnEntity – Lightspeed360 Apr 02 '16 at 22:16

1 Answers1

2

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.

Spencer
  • 21
  • 1
  • Thank you for your great answer even though I‘m not working for a server anymore. Maybe it can help other people :) – LeWimbes Aug 11 '18 at 09:48