Package redempt.redlib.misc
Class Hologram
java.lang.Object
redempt.redlib.misc.Hologram
Represents a number of floating armor stands intended to display information
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a line at the bottom of this Hologramvoid
clear()
Clears this Hologramstatic Hologram
Creates a Hologramvoid
Removes and re-adds all armor stands in this Hologramstatic Hologram
getAt
(org.bukkit.Location loc) Attempts to get a Hologram at a specified locationgetLine
(int line) getLines()
double
org.bukkit.Location
List<org.bukkit.entity.ArmorStand>
void
Inserts a line in this Hologramvoid
move
(org.bukkit.Location loc) Moves this Hologramvoid
Adds a line at the top of this Hologramvoid
remove
(int line) Removes a line from this Hologramvoid
Sets the text for a line of this Hologramvoid
setLineSpacing
(double lineSpacing) Sets the vertical distance between each line in this Hologramint
size()
-
Method Details
-
create
Creates a Hologram- Parameters:
loc
- The location to create the Hologram atlines
- The lines of text for this Hologram- Returns:
- The Hologram that was created
-
getAt
Attempts to get a Hologram at a specified location- Parameters:
loc
- The location to check at- Returns:
- The Hologram found at the location, or null if none was found
-
fixStands
public void fixStands()Removes and re-adds all armor stands in this Hologram -
getLine
- Parameters:
line
- The index of the line- Returns:
- The line of text at the given index
-
move
public void move(org.bukkit.Location loc) Moves this Hologram- Parameters:
loc
- The location to move this Hologram to
-
getLocation
public org.bukkit.Location getLocation()- Returns:
- The location of the top of this Hologram
-
getStands
- Returns:
- All the ArmorStands in this Hologram
-
setLine
Sets the text for a line of this Hologram- Parameters:
line
- The index of the line to settext
- The text to set the line to
-
remove
public void remove(int line) Removes a line from this Hologram- Parameters:
line
- The line number to remove
-
clear
public void clear()Clears this Hologram -
getLineSpacing
public double getLineSpacing()- Returns:
- The vertical distance between each line in this Hologram
-
setLineSpacing
public void setLineSpacing(double lineSpacing) Sets the vertical distance between each line in this Hologram- Parameters:
lineSpacing
- The line spacing to set
-
append
Adds a line at the bottom of this Hologram- Parameters:
text
- The text to append
-
prepend
Adds a line at the top of this Hologram- Parameters:
text
- The text to add
-
insert
Inserts a line in this Hologram- Parameters:
line
- The position to insert attext
- The text to insert
-
size
public int size()- Returns:
- The number of lines in this Hologram
-
getLines
-