Holographic Displays

Holographic Displays

3M Downloads

Client Side Ghost Holograms

Wolf2323 opened this issue ยท 2 comments

commented

Description

Hello, i am a developer of the plugin BetonQuest. We run into a littlebit more complex problem.
We have Holograms, that we show and hide to speciffic players with the VisibilityManager in a loop and the Holograms also move with the Location of Citizens NPCs. All this works fine, until we reload BetonQuest. If this is the case, sometimes Ghost Holograms appear. This is only the case if you actualy CANT see the hologram and only a package is send to the client, that there is a hologram.

I debugged it a long time and ended up with this explanation:
When we reload the Plugin, we delete the old Hologramm.
In the meantime, sometimes the loop is still running, and it set the visibility for players to true.
If the method to see a hologram is called, when the hologram is deleted, only the package of that hologram is sent to the player. This ends up with client side only ghost holograms. A relogin make the ghost holograms diappear.

I have to say, that the code for this feature on our side is not really clean and nice. And i will rework the code anyway and this should solve the problem. But i think this is a bad behavior and can also cost other developers mutch time.

So maybe this can be fixed on the end of HolographicDisplays or maybe a javadoc hint for the method to show a hologramm again can improve it.

How to reproduce

Program a loop, that call the visibility manager again and again, and then delete the hologram from outside of the loop. In some cases the ghost Holograms appear.

Platform

  • Server version (output of /version): git-Tuinity-"d1db107" (MC: 1.16.4)
  • Holographic Displays version (check with /hd): v2.4.5
  • ProtocolLib version, if installed (check with /protocol version): v4.5.1
  • Do you use plugins to allow players to join with multiple Minecraft versions (such as ViaVersion, ProtocolSupport, ...): NO

Additional context

You can view the Code here: https://github.com/BetonQuest/BetonQuest/blob/master/src/main/java/pl/betoncraft/betonquest/compatibility/citizens/CitizensHologram.java

commented

I close this, because i am not able anymore to reproduce this. I think it was solved

commented

I see, the VisibilityManager doesn't check if the hologram was deleted. I will improve it in Holographic Displays v3.