DecentSoftware-eu / DecentHolograms

A lightweight but powerful hologram plugin with many features and configuration options.
https://www.spigotmc.org/resources/96927/
GNU General Public License v3.0
211 stars 101 forks source link

Updating the hologram using the api doesn't work correctly #119

Closed KamlaXPL closed 1 year ago

KamlaXPL commented 1 year ago

Just making sure

Reproduction

DHAPI.setHologramLines() - it doesn't refresh the hologram, only when you walk away from it and come back will it send you the corrected lines

Solution

No response

Server Version

1.8.8

Client Version

1.8.8

Plugin Version

2.7.11

Log

No logs

d0by1 commented 1 year ago

Hello, I will need to see your code + Server and Plugin versions. Also, what do you mean by "doesn't refresh", is the line content wrong, or alignment of lines?

d0by1 commented 1 year ago

I can't help you without you providing the mentioned info. I also tested the method and it works just fine. I will now close this issue.

KamlaXPL commented 1 year ago

The content of the line doesn't display.

Code:

DHAPI.setHologramLines(DHAPI.getHologram("test"), Arrays.asList("test 1", "test 2"));
Bukkit.getScheduler().runTaskLater(this, () -> DHAPI.setHologramLines(DHAPI.getHologram("test"), Arrays.asList("test 3", "test 4")), 100L);

if the player is standing next to the hologram, when the scheduler is executed, the content won't update but the player will still see "test 1" and "test 2", and if the player walks away from the hologram, the content will disappear and the player will come closer again, the content will be "test 3" "test 4".