Class HologramManager

java.lang.Object
com.ranull.graves.manager.EntityDataManager
com.ranull.graves.manager.HologramManager

public final class HologramManager extends EntityDataManager
The HologramManager class is responsible for managing holograms associated with graves.
  • Field Details

    • plugin

      private final Graves plugin
  • Constructor Details

    • HologramManager

      public HologramManager(Graves plugin)
  • Method Details

    • createHologram

      public void createHologram(org.bukkit.Location location, Grave grave)
      Creates a hologram at the specified location for a given grave. Spawns each ArmorStand on the region thread for that line location.
    • removeHologram

      public void removeHologram(Grave grave)
      Removes all holograms associated with a grave.
    • removeHologram

      public void removeHologram(EntityData entityData)
      Removes a specific hologram associated with an entity data.
    • removeHologram

      private void removeHologram(Map<EntityData,org.bukkit.entity.Entity> entityDataMap)
      Removes multiple holograms associated with a map of entity data to entities. Entity removals are executed on the entity's region thread.
    • purgeLingeringHolograms

      public void purgeLingeringHolograms()
      Scans all worlds for hologram ArmorStands and schedules a region-thread check/removal for each matching stand. The outer iteration is lightweight; all state reads/writes are performed inside the entity's region execution.
    • hasGrave

      public Grave hasGrave(UUID graveUUID)
    • extractGraveUUIDFromStand

      private UUID extractGraveUUIDFromStand(org.bukkit.entity.ArmorStand stand)
    • extractGraveLocationKeyFromStand

      private String extractGraveLocationKeyFromStand(org.bukkit.entity.ArmorStand stand)
    • extractGraveUUIDFromTags

      private UUID extractGraveUUIDFromTags(org.bukkit.entity.Entity entity)
    • toLocKey

      private String toLocKey(org.bukkit.Location loc)
    • extractGraveLocationKeyFromTags

      private String extractGraveLocationKeyFromTags(org.bukkit.entity.Entity entity)
    • normalizeLocKey

      private String normalizeLocKey(String raw)
    • findFirstGroup

      private String findFirstGroup(Pattern p, String s)
    • locKeysMatch

      private boolean locKeysMatch(String expectedKey, String tagKey)
    • executeRegion

      private void executeRegion(org.bukkit.Location loc, Runnable task)
    • executeRegion

      private void executeRegion(org.bukkit.entity.Entity entity, Runnable task)