Interface Hologram<T>
- Type Parameters:
T- the type of the location
- All Known Subinterfaces:
DisplayHologram<T>,PagedHologram<T>
- All Known Implementing Classes:
CMIHologram,DHHologram,FHHologram,FoliaHologram,HDHologram,HDLegacyHologram,SimpleHologram,VanillaHologram
public interface Hologram<T>
A hologram
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLine(@NotNull HologramLine line) Add a line to the hologramvoidclear()Clear the hologramdefault Optional<HologramLine>getLine(int index) Get the line at the index@NotNull List<HologramLine>getLines()Get the lines of the hologramGet the location of the hologramgetName()Get the name of the hologramvoidinit()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 initializedvoidremoveLine(int index) Remove a line at the index from the hologramdefault voidsetLine(int index, @NotNull HologramLine line) Set the line at the index to the new linevoidsetLines(@NotNull List<HologramLine> lines) Set the lines of the hologramvoidsetLocation(T location) Set the location of the hologramdefault intsize()Get the amount of lines
-
Method Details
-
getLines
Get the lines of the hologram- Returns:
- the lines
-
setLines
Set the lines of the hologram- Parameters:
lines- the lines
-
addLine
Add a line to the hologram- Parameters:
line- the line
-
insertLine
Insert a line to the hologram at the index and move the rest down- Parameters:
index- the indexline- the line
-
removeLine
void removeLine(int index) Remove a line at the index from the hologram- Parameters:
index- the index
-
setLine
Set the line at the index to the new line- Parameters:
index- the indexline- the new line
-
getLine
Get the line at the index- Parameters:
index- the index- Returns:
- the line
-
size
default int size()Get the amount of lines- Returns:
- the amount
-
getName
String getName()Get the name of the hologram- Returns:
- the name
-
init
void init()Initialize the hologram. Call this before using the hologram. -
clear
void clear()Clear the hologram -
isInitialized
boolean isInitialized()Check if the hologram is initialized- Returns:
- true if it is
-
getLocation
T getLocation()Get the location of the hologram- Returns:
- the location
-
setLocation
Set the location of the hologram- Parameters:
location- the location
-