Class HologramManager

java.lang.Object
com.zetaplugins.cookieclickerz.util.holograms.HologramManager
Direct Known Subclasses:
DecentHologramManager, FancyHologramManager

public abstract class HologramManager extends Object
Abstract class for managing holograms in the CookieClickerZ plugin. This class provides methods to spawn and remove holograms for clickers. It is designed to be extended by specific hologram implementations.
  • Constructor Details

  • Method Details

    • getPlugin

      protected CookieClickerZ getPlugin()
    • spawnAllHolograms

      public void spawnAllHolograms()
      Spawns holograms for all clickers currently managed by the ClickerManager.
    • spawnHologram

      public abstract void spawnHologram(@NotNull ClickerManager.Clicker clicker)
      Spawns a hologram for the given clicker.
      Parameters:
      clicker - the Clicker object
    • removeHologram

      public abstract void removeHologram(@NotNull @NotNull String clickerName)
      Removes the hologram associated with the given clicker name.
      Parameters:
      clickerName - the name of the clicker
    • removeHologram

      public void removeHologram(@NotNull ClickerManager.Clicker clicker)
      Removes the hologram associated with the given clicker.
      Parameters:
      clicker - the Clicker object
    • removeAllHolograms

      public void removeAllHolograms()
      Removes all holograms for all clickers currently managed by the ClickerManager.
    • getHologramName

      protected String getHologramName(@NotNull ClickerManager.Clicker clicker)
      Generates a unique hologram name based on the clicker's name. The format is "cc_[clickerName]".
      Parameters:
      clicker - the Clicker object
      Returns:
      the hologram name
    • getHologramName

      protected String getHologramName(@NotNull @NotNull String clickerName)
      Generates a unique hologram name based on the clicker's name. The format is "cc_[clickerName]".
      Parameters:
      clickerName - the name of the clicker
      Returns:
      the hologram name
    • getHologramLocation

      protected org.bukkit.Location getHologramLocation(@NotNull ClickerManager.Clicker clicker)
      Gets the location where the hologram should be spawned for the given clicker.
      Parameters:
      clicker - the Clicker object
      Returns:
      the location for the hologram
    • getHologramLines

      protected List<String> getHologramLines(@NotNull ClickerManager.Clicker clicker)
      Retrieves the lines to be displayed in the hologram for the given clicker.
      Parameters:
      clicker - the Clicker object
      Returns:
      a list of strings representing the hologram lines