diff --git a/src/main/java/de/oliver/fancyholograms/HologramManagerImpl.java b/src/main/java/de/oliver/fancyholograms/HologramManagerImpl.java index bcaa3fc5..77684852 100644 --- a/src/main/java/de/oliver/fancyholograms/HologramManagerImpl.java +++ b/src/main/java/de/oliver/fancyholograms/HologramManagerImpl.java @@ -182,6 +182,14 @@ void initializeTasks() { updateTimes.put(hologram.getData().getName(), time); } }); + + this.plugin.getScheduler().runTaskTimerAsynchronously(20L, 20L, () -> { + for (final Hologram hologram : this.plugin.getHologramsManager().getHolograms()) { + for (final Player player : Bukkit.getOnlinePlayers()) { + hologram.checkAndUpdateShownStateForPlayer(player); + } + } + }); } /** diff --git a/src/main/java/de/oliver/fancyholograms/listeners/PlayerListener.java b/src/main/java/de/oliver/fancyholograms/listeners/PlayerListener.java index 4c9f015d..b7694042 100644 --- a/src/main/java/de/oliver/fancyholograms/listeners/PlayerListener.java +++ b/src/main/java/de/oliver/fancyholograms/listeners/PlayerListener.java @@ -40,17 +40,6 @@ public void onQuit(@NotNull final PlayerQuitEvent event) { }); } - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onMove(@NotNull final PlayerMoveEvent event) { - if (!event.hasChangedBlock()) { - return; // reduce checks we need to do - } - - for (final Hologram hologram : this.plugin.getHologramsManager().getHolograms()) { - hologram.checkAndUpdateShownStateForPlayer(event.getPlayer()); - } - } - @EventHandler(priority = EventPriority.MONITOR) public void onTeleport(@NotNull final PlayerTeleportEvent event) { for (final Hologram hologram : this.plugin.getHologramsManager().getHolograms()) {