Class FHHologram
java.lang.Object
io.github.projectunified.unihologram.spigot.fancyholograms.FHHologram
- All Implemented Interfaces:
DisplayHologram<org.bukkit.Location>,Hologram<org.bukkit.Location>,Visibility<org.bukkit.entity.Player>,PlayerVisibility
public class FHHologram
extends Object
implements PlayerVisibility, DisplayHologram<org.bukkit.Location>
The hologram for FancyHolograms
-
Constructor Summary
ConstructorsConstructorDescriptionFHHologram(de.oliver.fancyholograms.api.hologram.Hologram hologram) Create a new hologramFHHologram(String name, org.bukkit.Location location) Create a new hologram -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLine(@NotNull HologramLine line) Add a line to the hologramvoidclear()Clear the hologramGet the text alignmentGet the background colorGet the billboard@NotNull List<HologramLine>getLines()Get the lines of the hologramorg.bukkit.LocationGet the location of the hologramgetName()Get the name of the hologramgetScale()Get the scale of the textfloatGet the shadow radiusfloatGet the shadow strengthvoidhideAll()Hide the hologram from all viewersvoidhideTo(org.bukkit.entity.Player viewer) Hide the hologram from the viewervoidinit()Initialize the hologram.voidinsertLine(int index, @NotNull HologramLine line) Insert a line to the hologram at the index and move the rest downbooleanCheck if the hologram is initializedbooleanGet if the text is shadowedbooleanisVisible(org.bukkit.entity.Player viewer) Check if the viewer can see the hologramvoidremoveLine(int index) Remove a line at the index from the hologramvoidsetAlignment(DisplayTextAlignment alignment) Set the text alignmentvoidsetBackgroundColor(Color color) Set the background colorvoidsetBillboard(DisplayBillboard billboard) Set the billboardvoidsetLines(@NotNull List<HologramLine> lines) Set the lines of the hologramvoidsetLocation(org.bukkit.Location location) Set the location of the hologramvoidsetScale(DisplayScale scale) Set the scale of the textvoidsetShadowed(boolean shadowed) Set if the text is shadowedvoidsetShadowRadius(float radius) Set the shadow radiusvoidsetShadowStrength(float strength) Set the shadow strengthvoidshowAll()Show the hologram to all viewersvoidshowTo(org.bukkit.entity.Player viewer) Show the hologram to the viewer
-
Constructor Details
-
FHHologram
Create a new hologram- Parameters:
name- the name of the hologramlocation- the location of the hologram
-
FHHologram
public FHHologram(de.oliver.fancyholograms.api.hologram.Hologram hologram) Create a new hologram- Parameters:
hologram- the hologram
-
-
Method Details
-
getLines
Description copied from interface:HologramGet the lines of the hologram -
setLines
Description copied from interface:HologramSet the lines of the hologram -
addLine
Description copied from interface:HologramAdd a line to the hologram -
insertLine
Description copied from interface:HologramInsert a line to the hologram at the index and move the rest down- Specified by:
insertLinein interfaceHologram<org.bukkit.Location>- Parameters:
index- the indexline- the line
-
removeLine
public void removeLine(int index) Description copied from interface:HologramRemove a line at the index from the hologram- Specified by:
removeLinein interfaceHologram<org.bukkit.Location>- Parameters:
index- the index
-
getName
Description copied from interface:HologramGet the name of the hologram -
init
public void init()Description copied from interface:HologramInitialize the hologram. Call this before using the hologram. -
clear
public void clear()Description copied from interface:HologramClear the hologram -
isInitialized
public boolean isInitialized()Description copied from interface:HologramCheck if the hologram is initialized- Specified by:
isInitializedin interfaceHologram<org.bukkit.Location>- Returns:
- true if it is
-
getLocation
public org.bukkit.Location getLocation()Description copied from interface:HologramGet the location of the hologram- Specified by:
getLocationin interfaceHologram<org.bukkit.Location>- Returns:
- the location
-
setLocation
public void setLocation(org.bukkit.Location location) Description copied from interface:HologramSet the location of the hologram- Specified by:
setLocationin interfaceHologram<org.bukkit.Location>- Parameters:
location- the location
-
isVisible
public boolean isVisible(org.bukkit.entity.Player viewer) Description copied from interface:VisibilityCheck if the viewer can see the hologram- Specified by:
isVisiblein interfaceVisibility<org.bukkit.entity.Player>- Parameters:
viewer- the viewer- Returns:
- true if the viewer can see the hologram
-
showAll
public void showAll()Description copied from interface:VisibilityShow the hologram to all viewers- Specified by:
showAllin interfaceVisibility<org.bukkit.entity.Player>
-
hideAll
public void hideAll()Description copied from interface:VisibilityHide the hologram from all viewers- Specified by:
hideAllin interfaceVisibility<org.bukkit.entity.Player>
-
showTo
public void showTo(org.bukkit.entity.Player viewer) Description copied from interface:VisibilityShow the hologram to the viewer- Specified by:
showToin interfaceVisibility<org.bukkit.entity.Player>- Parameters:
viewer- the viewer
-
hideTo
public void hideTo(org.bukkit.entity.Player viewer) Description copied from interface:VisibilityHide the hologram from the viewer- Specified by:
hideToin interfaceVisibility<org.bukkit.entity.Player>- Parameters:
viewer- the viewer
-
getBackgroundColor
Description copied from interface:DisplayHologramGet the background color- Specified by:
getBackgroundColorin interfaceDisplayHologram<org.bukkit.Location>- Returns:
- the background color
-
setBackgroundColor
Description copied from interface:DisplayHologramSet the background color- Specified by:
setBackgroundColorin interfaceDisplayHologram<org.bukkit.Location>- Parameters:
color- the background color
-
getScale
Description copied from interface:DisplayHologramGet the scale of the text- Specified by:
getScalein interfaceDisplayHologram<org.bukkit.Location>- Returns:
- the scale
-
setScale
Description copied from interface:DisplayHologramSet the scale of the text- Specified by:
setScalein interfaceDisplayHologram<org.bukkit.Location>- Parameters:
scale- the scale
-
getShadowRadius
public float getShadowRadius()Description copied from interface:DisplayHologramGet the shadow radius- Specified by:
getShadowRadiusin interfaceDisplayHologram<org.bukkit.Location>- Returns:
- the shadow radius
-
setShadowRadius
public void setShadowRadius(float radius) Description copied from interface:DisplayHologramSet the shadow radius- Specified by:
setShadowRadiusin interfaceDisplayHologram<org.bukkit.Location>- Parameters:
radius- the shadow radius
-
getShadowStrength
public float getShadowStrength()Description copied from interface:DisplayHologramGet the shadow strength- Specified by:
getShadowStrengthin interfaceDisplayHologram<org.bukkit.Location>- Returns:
- the shadow strength
-
setShadowStrength
public void setShadowStrength(float strength) Description copied from interface:DisplayHologramSet the shadow strength- Specified by:
setShadowStrengthin interfaceDisplayHologram<org.bukkit.Location>- Parameters:
strength- the shadow strength
-
isShadowed
public boolean isShadowed()Description copied from interface:DisplayHologramGet if the text is shadowed- Specified by:
isShadowedin interfaceDisplayHologram<org.bukkit.Location>- Returns:
- true if it is
-
setShadowed
public void setShadowed(boolean shadowed) Description copied from interface:DisplayHologramSet if the text is shadowed- Specified by:
setShadowedin interfaceDisplayHologram<org.bukkit.Location>- Parameters:
shadowed- true if it is
-
getBillboard
Description copied from interface:DisplayHologramGet the billboard- Specified by:
getBillboardin interfaceDisplayHologram<org.bukkit.Location>- Returns:
- the billboard
-
setBillboard
Description copied from interface:DisplayHologramSet the billboard- Specified by:
setBillboardin interfaceDisplayHologram<org.bukkit.Location>- Parameters:
billboard- the billboard
-
getAlignment
Description copied from interface:DisplayHologramGet the text alignment- Specified by:
getAlignmentin interfaceDisplayHologram<org.bukkit.Location>- Returns:
- the text alignment
-
setAlignment
Description copied from interface:DisplayHologramSet the text alignment- Specified by:
setAlignmentin interfaceDisplayHologram<org.bukkit.Location>- Parameters:
alignment- the text alignment
-