From 496fd4ae41a6182a7ad83d91c081ce21f024a186 Mon Sep 17 00:00:00 2001 From: filoghost Date: Sat, 24 Jul 2021 18:41:13 +0200 Subject: [PATCH] Add support for visibility options --- .../plugin/hologram/tracking/LocationBasedLineTracker.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LocationBasedLineTracker.java b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LocationBasedLineTracker.java index 1bc9f2be..086a3257 100644 --- a/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LocationBasedLineTracker.java +++ b/plugin/src/main/java/me/filoghost/holographicdisplays/plugin/hologram/tracking/LocationBasedLineTracker.java @@ -73,7 +73,10 @@ abstract class LocationBasedLineTracker extends double diffX = Math.abs(playerLocation.getX() - locationX); double diffZ = Math.abs(playerLocation.getZ() - locationZ); - return playerLocation.getWorld() == world && diffX <= (double) ENTITY_VIEW_RANGE && diffZ <= (double) ENTITY_VIEW_RANGE; + return playerLocation.getWorld() == world + && diffX <= (double) ENTITY_VIEW_RANGE + && diffZ <= (double) ENTITY_VIEW_RANGE + && line.getHologram().isVisibleTo(player); } @MustBeInvokedByOverriders