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
ConstructorDescriptionFHHologram
(de.oliver.fancyholograms.api.Hologram hologram) Create a new hologramFHHologram
(String name, org.bukkit.Location location) Create a new hologram -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLine
(@NotNull HologramLine line) Add a line to the hologramvoid
clear()
Clear the hologramGet the text alignmentGet the background colorGet the billboard@NotNull List<HologramLine>
getLines()
Get the lines of the hologramorg.bukkit.Location
Get the location of the hologramgetName()
Get the name of the hologramgetScale()
Get the scale of the textfloat
Get the shadow radiusfloat
Get the shadow strengthvoid
hideAll()
Hide the hologram from all viewersvoid
hideTo
(org.bukkit.entity.Player viewer) Hide the hologram from the viewervoid
init()
Initialize the hologram.void
insertLine
(int index, @NotNull HologramLine line) Insert a line to the hologram at the index and move the rest downboolean
Check if the hologram is initializedboolean
Get if the text is shadowedboolean
isVisible
(org.bukkit.entity.Player viewer) Check if the viewer can see the hologramvoid
removeLine
(int index) Remove a line at the index from the hologramvoid
setAlignment
(DisplayTextAlignment alignment) Set the text alignmentvoid
setBackgroundColor
(Color color) Set the background colorvoid
setBillboard
(DisplayBillboard billboard) Set the billboardvoid
setLines
(@NotNull List<HologramLine> lines) Set the lines of the hologramvoid
setLocation
(org.bukkit.Location location) Set the location of the hologramvoid
setScale
(DisplayScale scale) Set the scale of the textvoid
setShadowed
(boolean shadowed) Set if the text is shadowedvoid
setShadowRadius
(float radius) Set the shadow radiusvoid
setShadowStrength
(float strength) Set the shadow strengthvoid
showAll()
Show the hologram to all viewersvoid
showTo
(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) Create a new hologram- Parameters:
hologram
- the hologram
-
-
Method Details
-
getLines
Description copied from interface:Hologram
Get the lines of the hologram -
setLines
Description copied from interface:Hologram
Set the lines of the hologram -
addLine
Description copied from interface:Hologram
Add a line to the hologram -
insertLine
Description copied from interface:Hologram
Insert a line to the hologram at the index and move the rest down- Specified by:
insertLine
in interfaceHologram<org.bukkit.Location>
- Parameters:
index
- the indexline
- the line
-
removeLine
public void removeLine(int index) Description copied from interface:Hologram
Remove a line at the index from the hologram- Specified by:
removeLine
in interfaceHologram<org.bukkit.Location>
- Parameters:
index
- the index
-
getName
Description copied from interface:Hologram
Get the name of the hologram -
init
public void init()Description copied from interface:Hologram
Initialize the hologram. Call this before using the hologram. -
clear
public void clear()Description copied from interface:Hologram
Clear the hologram -
isInitialized
public boolean isInitialized()Description copied from interface:Hologram
Check if the hologram is initialized- Specified by:
isInitialized
in interfaceHologram<org.bukkit.Location>
- Returns:
- true if it is
-
getLocation
public org.bukkit.Location getLocation()Description copied from interface:Hologram
Get the location of the hologram- Specified by:
getLocation
in interfaceHologram<org.bukkit.Location>
- Returns:
- the location
-
setLocation
public void setLocation(org.bukkit.Location location) Description copied from interface:Hologram
Set the location of the hologram- Specified by:
setLocation
in interfaceHologram<org.bukkit.Location>
- Parameters:
location
- the location
-
isVisible
public boolean isVisible(org.bukkit.entity.Player viewer) Description copied from interface:Visibility
Check if the viewer can see the hologram- Specified by:
isVisible
in 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:Visibility
Show the hologram to all viewers- Specified by:
showAll
in interfaceVisibility<org.bukkit.entity.Player>
-
hideAll
public void hideAll()Description copied from interface:Visibility
Hide the hologram from all viewers- Specified by:
hideAll
in interfaceVisibility<org.bukkit.entity.Player>
-
showTo
public void showTo(org.bukkit.entity.Player viewer) Description copied from interface:Visibility
Show the hologram to the viewer- Specified by:
showTo
in interfaceVisibility<org.bukkit.entity.Player>
- Parameters:
viewer
- the viewer
-
hideTo
public void hideTo(org.bukkit.entity.Player viewer) Description copied from interface:Visibility
Hide the hologram from the viewer- Specified by:
hideTo
in interfaceVisibility<org.bukkit.entity.Player>
- Parameters:
viewer
- the viewer
-
getBackgroundColor
Description copied from interface:DisplayHologram
Get the background color- Specified by:
getBackgroundColor
in interfaceDisplayHologram<org.bukkit.Location>
- Returns:
- the background color
-
setBackgroundColor
Description copied from interface:DisplayHologram
Set the background color- Specified by:
setBackgroundColor
in interfaceDisplayHologram<org.bukkit.Location>
- Parameters:
color
- the background color
-
getScale
Description copied from interface:DisplayHologram
Get the scale of the text- Specified by:
getScale
in interfaceDisplayHologram<org.bukkit.Location>
- Returns:
- the scale
-
setScale
Description copied from interface:DisplayHologram
Set the scale of the text- Specified by:
setScale
in interfaceDisplayHologram<org.bukkit.Location>
- Parameters:
scale
- the scale
-
getShadowRadius
public float getShadowRadius()Description copied from interface:DisplayHologram
Get the shadow radius- Specified by:
getShadowRadius
in interfaceDisplayHologram<org.bukkit.Location>
- Returns:
- the shadow radius
-
setShadowRadius
public void setShadowRadius(float radius) Description copied from interface:DisplayHologram
Set the shadow radius- Specified by:
setShadowRadius
in interfaceDisplayHologram<org.bukkit.Location>
- Parameters:
radius
- the shadow radius
-
getShadowStrength
public float getShadowStrength()Description copied from interface:DisplayHologram
Get the shadow strength- Specified by:
getShadowStrength
in interfaceDisplayHologram<org.bukkit.Location>
- Returns:
- the shadow strength
-
setShadowStrength
public void setShadowStrength(float strength) Description copied from interface:DisplayHologram
Set the shadow strength- Specified by:
setShadowStrength
in interfaceDisplayHologram<org.bukkit.Location>
- Parameters:
strength
- the shadow strength
-
isShadowed
public boolean isShadowed()Description copied from interface:DisplayHologram
Get if the text is shadowed- Specified by:
isShadowed
in interfaceDisplayHologram<org.bukkit.Location>
- Returns:
- true if it is
-
setShadowed
public void setShadowed(boolean shadowed) Description copied from interface:DisplayHologram
Set if the text is shadowed- Specified by:
setShadowed
in interfaceDisplayHologram<org.bukkit.Location>
- Parameters:
shadowed
- true if it is
-
getBillboard
Description copied from interface:DisplayHologram
Get the billboard- Specified by:
getBillboard
in interfaceDisplayHologram<org.bukkit.Location>
- Returns:
- the billboard
-
setBillboard
Description copied from interface:DisplayHologram
Set the billboard- Specified by:
setBillboard
in interfaceDisplayHologram<org.bukkit.Location>
- Parameters:
billboard
- the billboard
-
getAlignment
Description copied from interface:DisplayHologram
Get the text alignment- Specified by:
getAlignment
in interfaceDisplayHologram<org.bukkit.Location>
- Returns:
- the text alignment
-
setAlignment
Description copied from interface:DisplayHologram
Set the text alignment- Specified by:
setAlignment
in interfaceDisplayHologram<org.bukkit.Location>
- Parameters:
alignment
- the text alignment
-