Class HologramData

java.lang.Object
de.oliver.fancyholograms.api.data.HologramData
All Implemented Interfaces:
YamlData
Direct Known Subclasses:
DisplayHologramData

public class HologramData extends Object implements YamlData
  • Field Details

    • DEFAULT_VISIBILITY_DISTANCE

      public static final int DEFAULT_VISIBILITY_DISTANCE
      See Also:
    • DEFAULT_VISIBILITY

      public static final Visibility DEFAULT_VISIBILITY
    • DEFAULT_IS_VISIBLE

      public static final boolean DEFAULT_IS_VISIBLE
      See Also:
    • DEFAULT_PERSISTENCE

      public static final boolean DEFAULT_PERSISTENCE
      See Also:
  • Constructor Details

    • HologramData

      public HologramData(String name, HologramType type, org.bukkit.Location location)
      Parameters:
      name - Name of hologram
      type - Type of hologram
      location - Location of hologram Default values are already set
  • Method Details

    • getName

      @NotNull public @NotNull String getName()
    • getType

      @NotNull public @NotNull HologramType getType()
    • getLocation

      @NotNull public @NotNull org.bukkit.Location getLocation()
    • setLocation

      public HologramData setLocation(@Nullable @Nullable org.bukkit.Location location)
    • hasChanges

      public final boolean hasChanges()
      Returns:
      Whether the hologram needs to send an update to players
    • setHasChanges

      public final void setHasChanges(boolean hasChanges)
      Parameters:
      hasChanges - Whether the hologram needs to send an update to players
    • getVisibilityDistance

      public int getVisibilityDistance()
    • setVisibilityDistance

      public HologramData setVisibilityDistance(int visibilityDistance)
    • getVisibility

      public Visibility getVisibility()
      Get the type of visibility for the hologram.
      Returns:
      type of visibility.
    • setVisibility

      public HologramData setVisibility(@NotNull @NotNull Visibility visibility)
      Set the type of visibility for the hologram.
    • isPersistent

      public boolean isPersistent()
    • setPersistent

      public HologramData setPersistent(boolean persistent)
    • getLinkedNpcName

      public String getLinkedNpcName()
    • setLinkedNpcName

      public HologramData setLinkedNpcName(String linkedNpcName)
    • read

      public boolean read(org.bukkit.configuration.ConfigurationSection section, String name)
      Description copied from interface: YamlData
      Reads the data from the given configuration section.
      Specified by:
      read in interface YamlData
      Returns:
      Whether the data was read successfully.
    • write

      public boolean write(org.bukkit.configuration.ConfigurationSection section, String name)
      Description copied from interface: YamlData
      Writes the data to the given configuration section.
      Specified by:
      write in interface YamlData
      Returns:
      Whether the data was written successfully.
    • copy

      public HologramData copy(String name)