Class HologramData

java.lang.Object
com.ranull.graves.data.EntityData
com.ranull.graves.data.HologramData
All Implemented Interfaces:
Serializable

public class HologramData extends EntityData
Represents data for a hologram entity associated with a grave, including its line number.
See Also:
  • Constructor Details

    • HologramData

      public HologramData(org.bukkit.Location location, UUID uuidEntity, UUID uuidGrave, int line)
      Constructs a new HologramData instance. Defaults backend to ARMOR_STAND for backwards compatibility.
      Parameters:
      location - The location of the hologram.
      uuidEntity - The UUID of the hologram entity.
      uuidGrave - The UUID of the associated grave.
      line - The line number of the hologram.
    • HologramData

      public HologramData(org.bukkit.Location location, UUID uuidEntity, UUID uuidGrave, int line, HologramData.Backend backend)
      Constructs a new HologramData instance with an explicit backend.
      Parameters:
      location - The location of the hologram.
      uuidEntity - The UUID of the hologram entity.
      uuidGrave - The UUID of the associated grave.
      line - The line number of the hologram.
      backend - The backend that created the hologram entity.
  • Method Details

    • getLine

      public int getLine()
      Gets the line number of the hologram.
      Returns:
      The line number of the hologram.
    • getBackend

      public HologramData.Backend getBackend()
      Gets the backend used for this hologram entry.
      Returns:
      backend
    • getChunkX

      public int getChunkX()
      Gets the chunk X coordinate where this hologram resides.
      Returns:
      chunk X
    • getChunkZ

      public int getChunkZ()
      Gets the chunk Z coordinate where this hologram resides.
      Returns:
      chunk Z
    • isChunkLoaded

      public boolean isChunkLoaded()
      Returns true if the hologram's chunk is currently loaded. This does not force-load the chunk.
      Returns:
      true if loaded, otherwise false
    • getLoadedChunkOrNull

      public org.bukkit.Chunk getLoadedChunkOrNull()
      Returns the chunk if loaded, otherwise null. Does not load the chunk.
      Returns:
      loaded chunk or null
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object