Class Hologram
java.lang.Object
com.bencodez.advancedcore.api.hologram.Hologram
Represents a hologram using armor stands.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new hologram at the specified location with the given name.Creates a new hologram with marker setting.Creates a new hologram with marker and glowing settings.Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value) Creates a new hologram with persistent data.Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value, String str, Object value1) Creates a new hologram with persistent data and entity metadata. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.persistence.PersistentDataContainerGets the persistent data container of the armor stand.voidglow(boolean value) Sets the glowing state of the hologram.booleanisAlive()Checks if the hologram is alive.booleanChecks if the hologram has been created.voidkill()Kills and removes the hologram.
-
Constructor Details
-
Hologram
Creates a new hologram at the specified location with the given name.- Parameters:
loc- the locationname- the hologram name
-
Hologram
Creates a new hologram with marker setting.- Parameters:
loc- the locationname- the hologram namemarker- whether to set as marker
-
Hologram
Creates a new hologram with marker and glowing settings.- Parameters:
loc- the locationname- the hologram namemarker- whether to set as markerglowing- whether the hologram should glow
-
Hologram
public Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value) Creates a new hologram with persistent data.- Parameters:
loc- the locationname- the hologram namemarker- whether to set as markerglowing- whether the hologram should glowkey- the namespaced key for persistent datavalue- the persistent data value
-
Hologram
public Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value, String str, Object value1) Creates a new hologram with persistent data and entity metadata.- Parameters:
loc- the locationname- the hologram namemarker- whether to set as markerglowing- whether the hologram should glowkey- the namespaced key for persistent datavalue- the persistent data valuestr- the metadata keyvalue1- the metadata value
-
-
Method Details
-
getPersistentDataHolder
public org.bukkit.persistence.PersistentDataContainer getPersistentDataHolder()Gets the persistent data container of the armor stand.- Returns:
- the persistent data container
-
glow
public void glow(boolean value) Sets the glowing state of the hologram.- Parameters:
value- whether the hologram should glow
-
isAlive
public boolean isAlive()Checks if the hologram is alive.- Returns:
- true if the armor stand is not dead, false otherwise
-
isCreated
public boolean isCreated()Checks if the hologram has been created.- Returns:
- true if the armor stand exists, false otherwise
-
kill
public void kill()Kills and removes the hologram.
-