Search in sources :

Example 1 with HologramLine

use of com.gmail.filoghost.holographicdisplays.api.line.HologramLine in project RoseStacker by Rosewood-Development.

the class HolographicDisplaysHologramHandler method isHologram.

@Override
public boolean isHologram(Entity entity) {
    NMSEntityBase entityBase = HolographicDisplays.getNMSManager().getNMSEntityBase(entity);
    if (entityBase == null)
        return false;
    HologramLine hologramLine = entityBase.getHologramLine();
    if (hologramLine == null)
        return false;
    Hologram target = entityBase.getHologramLine().getParent();
    if (target == null)
        return false;
    return this.holograms.values().stream().anyMatch(target::equals);
}
Also used : Hologram(com.gmail.filoghost.holographicdisplays.api.Hologram) HologramLine(com.gmail.filoghost.holographicdisplays.api.line.HologramLine) NMSEntityBase(com.gmail.filoghost.holographicdisplays.nms.interfaces.entity.NMSEntityBase)

Aggregations

Hologram (com.gmail.filoghost.holographicdisplays.api.Hologram)1 HologramLine (com.gmail.filoghost.holographicdisplays.api.line.HologramLine)1 NMSEntityBase (com.gmail.filoghost.holographicdisplays.nms.interfaces.entity.NMSEntityBase)1