@@ -78,7 +78,7 @@ private boolean isWithinVisibilityDistance(@NotNull final Hologram hologram, @No
7878 }
7979
8080 public void initRefreshTask () {
81- FancyHologramsPlugin .get ().getHologramThread ().scheduleAtFixedRate (() -> {
81+ FancyHologramsPlugin .get ().getHologramThread ().scheduleWithFixedDelay (() -> {
8282 for (Hologram hologram : FancyHologramsPlugin .get ().getRegistry ().getAll ()) {
8383 refreshHologram (hologram , Bukkit .getOnlinePlayers ().toArray (new Player [0 ]));
8484 }
@@ -87,10 +87,10 @@ public void initRefreshTask() {
8787
8888 public void initUpdateTask () {
8989 final var updateTimes = CacheBuilder .newBuilder ()
90- .expireAfterAccess (Duration .ofMinutes (5 ))
91- .<String , Long >build ();
90+ .expireAfterAccess (Duration .ofMinutes (5 ))
91+ .<String , Long >build ();
9292
93- FancyHologramsPlugin .get ().getHologramThread ().scheduleAtFixedRate (() -> {
93+ FancyHologramsPlugin .get ().getHologramThread ().scheduleWithFixedDelay (() -> {
9494 final var time = System .currentTimeMillis ();
9595
9696 for (final var hologram : FancyHologramsPlugin .get ().getRegistry ().getAll ()) {
@@ -109,7 +109,7 @@ public void initUpdateTask() {
109109 }
110110 }, 50 , 1000 , TimeUnit .MILLISECONDS );
111111
112- FancyHologramsPlugin .get ().getHologramThread ().scheduleAtFixedRate (() -> {
112+ FancyHologramsPlugin .get ().getHologramThread ().scheduleWithFixedDelay (() -> {
113113 final var time = System .currentTimeMillis ();
114114
115115 for (final var hologram : FancyHologramsPlugin .get ().getRegistry ().getAll ()) {
@@ -136,7 +136,7 @@ public void initUpdateTask() {
136136 }, 50 , 50 , TimeUnit .MILLISECONDS );
137137 }
138138
139- /**
139+ /**
140140 * Syncs a hologram with its linked NPC, if any.
141141 *
142142 * @param hologram The hologram to sync.
@@ -158,7 +158,7 @@ public void syncHologramWithNpc(@NotNull final Hologram hologram) {
158158
159159 final var npcScale = npc .getData ().getScale ();
160160
161- if (hologram .getData () instanceof DisplayHologramData displayData ) {
161+ if (hologram .getData () instanceof DisplayHologramData displayData ) {
162162 displayData .setScale (new Vector3f (npcScale ));
163163 }
164164
0 commit comments