Add support for visibility options

This commit is contained in:
filoghost 2021-07-24 18:41:13 +02:00
parent 6d54e73518
commit 496fd4ae41

View File

@ -73,7 +73,10 @@ abstract class LocationBasedLineTracker<T extends StandardHologramLine> 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