Class HologramManager
java.lang.Object
com.zetaplugins.cookieclickerz.util.holograms.HologramManager
- Direct Known Subclasses:
DecentHologramManager
,FancyHologramManager
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHologramLines
(ClickerManager.Clicker clicker) Retrieves the lines to be displayed in the hologram for the given clicker.protected org.bukkit.Location
Gets the location where the hologram should be spawned for the given clicker.protected String
getHologramName
(ClickerManager.Clicker clicker) Generates a unique hologram name based on the clicker's name.protected String
getHologramName
(@NotNull String clickerName) Generates a unique hologram name based on the clicker's name.protected CookieClickerZ
void
Removes all holograms for all clickers currently managed by the ClickerManager.void
removeHologram
(ClickerManager.Clicker clicker) Removes the hologram associated with the given clicker.abstract void
removeHologram
(@NotNull String clickerName) Removes the hologram associated with the given clicker name.void
Spawns holograms for all clickers currently managed by the ClickerManager.abstract void
spawnHologram
(ClickerManager.Clicker clicker) Spawns a hologram for the given clicker.
-
Constructor Details
-
HologramManager
-
-
Method Details
-
getPlugin
-
spawnAllHolograms
public void spawnAllHolograms()Spawns holograms for all clickers currently managed by the ClickerManager. -
spawnHologram
Spawns a hologram for the given clicker.- Parameters:
clicker
- the Clicker object
-
removeHologram
Removes the hologram associated with the given clicker name.- Parameters:
clickerName
- the name of the clicker
-
removeHologram
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
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
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
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
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
-