Class SimpleHologram<T>
java.lang.Object
io.github.projectunified.unihologram.api.simple.SimpleHologram<T>
- Type Parameters:
T
- the type of the location
- All Implemented Interfaces:
Hologram<T>
- Direct Known Subclasses:
FoliaHologram
,VanillaHologram
A simple hologram for features that only support updating the whole hologram
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLine
(@NotNull HologramLine line) Add a line to the hologramvoid
clear()
Clear the hologramprotected abstract void
Clear the hologram@NotNull List<HologramLine>
getLines()
Get the lines of the hologramGet the location of the hologramgetName()
Get the name of the hologramvoid
init()
Initialize the hologram.protected abstract void
Initialize the hologramvoid
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 initializedvoid
removeLine
(int index) Remove a line at the index from the hologramvoid
setLine
(int index, @NotNull HologramLine line) Set the line at the index to the new linevoid
setLines
(@NotNull List<HologramLine> lines) Set the lines of the hologramvoid
setLocation
(T location) Set the location of the hologramprotected abstract void
Update the hologram
-
Field Details
-
lines
The current lines -
name
The name of the hologram -
location
The location of the hologram
-
-
Constructor Details
-
SimpleHologram
-
-
Method Details
-
updateHologram
protected abstract void updateHologram()Update the hologram -
initHologram
protected abstract void initHologram()Initialize the hologram -
clearHologram
protected abstract void clearHologram()Clear the hologram -
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 -
setLine
Description copied from interface:Hologram
Set the line at the index to the new line -
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<T>
- 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<T>
- 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<T>
- Returns:
- true if it is
-
getLocation
Description copied from interface:Hologram
Get the location of the hologram- Specified by:
getLocation
in interfaceHologram<T>
- Returns:
- the location
-
setLocation
Description copied from interface:Hologram
Set the location of the hologram- Specified by:
setLocation
in interfaceHologram<T>
- Parameters:
location
- the location
-