Package me.bimmr.bimmcore.hologram
Class Hologram
- java.lang.Object
-
- me.bimmr.bimmcore.utils.timed.TimedObject
-
- me.bimmr.bimmcore.hologram.Hologram
-
public class Hologram extends TimedObject
A Utilities class to create a Hologram
-
-
Field Summary
-
Fields inherited from class me.bimmr.bimmcore.utils.timed.TimedObject
timedEvent
-
-
Constructor Summary
Constructors Constructor Description Hologram(boolean showToAll, org.bukkit.Location location, java.lang.String text)
Create a Hologram TimedEvent is nullHologram(boolean showToAll, org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent)
Create a Hologram Doesn't start TimedEventHologram(boolean showToAll, org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Create a HologramHologram(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text)
Create a Hologram TimedEvent is nullHologram(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent)
Create a Hologram Doesn't start TimedEventHologram(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent, boolean startTimedEvent)
Create a HologramHologram(org.bukkit.Location location)
Create a Hologram Shows to all, TimedEvent is nullHologram(org.bukkit.Location location, java.lang.String text)
Create a Hologram Shows to all, TimedEvent is nullHologram(org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent)
Create a Hologram Shows to all, Doesn't start Timed EventHologram(org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Create a Hologram Shows to allHologram(org.bukkit.Location location, java.util.List<java.lang.String> text)
Create a Hologram Shows to all, TimedEvent is nullHologram(org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent)
Create a Hologram Shows to all, Doesn't start TimedEventHologram(org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent, boolean startTimedEvent)
Create a Hologram Shows to all
-
Method Summary
Modifier and Type Method Description Hologram
addBlankLine()
Add a blank line to the HologramHologram
addText(java.lang.String text)
Add text to the hologram TimedEvent is null CallsaddText(String, TimedEvent, boolean)
Hologram
addText(java.lang.String text, TimedEvent timedEvent)
Add text to the hologram with an attached TimedEvent TimedEvent doesn't auto-start CallsaddText(String, TimedEvent, boolean)
Hologram
addText(java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Add text to the hologram with an attached TimedEvent and saying if it auto-startsjava.util.List<HologramLine>
getHologramLines()
Gets hologram lines.org.bukkit.Location
getLocation()
Gets location.Viewer
getViewer()
Gets viewer.void
remove()
Remove the hologram and all the linesvoid
remove(java.lang.String player)
Remove the hologram from a playervoid
remove(org.bukkit.entity.Player player)
Remove the hologram from a playerHologram
setHologramLine(int line, java.lang.String text)
Sets hologram line.Hologram
setHologramLine(int line, java.lang.String text, TimedEvent timedEvent)
Sets hologram line.Hologram
setHologramLine(int line, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Sets hologram line.Hologram
setText(int line, java.lang.String text)
Set the text of line x TimedEvent is null CallssetText(int, String, TimedEvent, boolean)
Hologram
setText(int line, java.lang.String text, TimedEvent timedEvent)
Set the text of line x and attach a TimedEvent Doesn't auto-start the TimedEvent CallssetText(int, String, TimedEvent, boolean)
Hologram
setText(int line, java.lang.String text, TimedEvent timedEvent, boolean timedEventAutoStart)
Set the text of line x and attach a TimedEvent and say if it auto-startsHologram
setText(java.lang.String text)
Set the Text of the first line TimedEvent is null CallssetText(int, String, TimedEvent, boolean)
void
showPlayer(java.lang.String player)
Show the hologram to a playervoid
showPlayer(org.bukkit.entity.Player player)
Show the hologram to a player CallsshowPlayer(String)
-
Methods inherited from class me.bimmr.bimmcore.utils.timed.TimedObject
getTimedEvent, isTaskRunning, onTaskRun, setTimedEvent, setTimedEvent, setTimedEvent, setTimedEvent, startTask, stopTask
-
-
-
-
Constructor Detail
-
Hologram
public Hologram(org.bukkit.Location location)
Create a Hologram Shows to all, TimedEvent is null- Parameters:
location
- The location for the hologram line
-
Hologram
public Hologram(org.bukkit.Location location, java.lang.String text)
Create a Hologram Shows to all, TimedEvent is null- Parameters:
location
- The location for the hologram linetext
- The text for the hologram line as a String
-
Hologram
public Hologram(org.bukkit.Location location, java.util.List<java.lang.String> text)
Create a Hologram Shows to all, TimedEvent is null- Parameters:
location
- The location for the hologram linetext
- The text for the hologram line as a List
-
Hologram
public Hologram(boolean showToAll, org.bukkit.Location location, java.lang.String text)
Create a Hologram TimedEvent is null- Parameters:
showToAll
- If the hologram is shown to alllocation
- The location for the hologram linetext
- The text for the hologram line as a String
-
Hologram
public Hologram(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text)
Create a Hologram TimedEvent is null- Parameters:
showToAll
- If the hologram is shown to alllocation
- The location for the hologram linetext
- The text for the hologram line as a List
-
Hologram
public Hologram(boolean showToAll, org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent)
Create a Hologram Doesn't start TimedEvent- Parameters:
showToAll
- If the hologram is shown to alllocation
- The location for the hologram linetext
- The text for the hologram line as a StringtimedEvent
- The timed event to run
-
Hologram
public Hologram(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent)
Create a Hologram Doesn't start TimedEvent- Parameters:
showToAll
- If the hologram is shown to alllocation
- The location for the hologram linetext
- The text for the hologram line as a ListtimedEvent
- The timed event to run
-
Hologram
public Hologram(org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent)
Create a Hologram Shows to all, Doesn't start TimedEvent- Parameters:
location
- The location for the hologram linetext
- The text for the hologram line as a ListtimedEvent
- The timed event to run
-
Hologram
public Hologram(org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent)
Create a Hologram Shows to all, Doesn't start Timed Event- Parameters:
location
- The location for the hologram linetext
- The text for the hologram line as a StringtimedEvent
- The timed event to run
-
Hologram
public Hologram(org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Create a Hologram Shows to all- Parameters:
location
- The location for the hologram linetext
- The text for the hologram line as a StringtimedEvent
- The timed event to runstartTimedEvent
- If timed even is starting right away
-
Hologram
public Hologram(org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent, boolean startTimedEvent)
Create a Hologram Shows to all- Parameters:
location
- The location for the hologram linetext
- The text for the hologram line as a ListtimedEvent
- The timed event to runstartTimedEvent
- If timed even is starting right away
-
Hologram
public Hologram(boolean showToAll, org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Create a Hologram- Parameters:
showToAll
- If the hologram is shown to alllocation
- The location for the hologram linetext
- The text for the hologram line as a StringtimedEvent
- The timed event to runstartTimedEvent
- If timed even is starting right away
-
Hologram
public Hologram(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent, boolean startTimedEvent)
Create a Hologram- Parameters:
showToAll
- If the hologram is shown to alllocation
- The location for the hologram linetext
- The text for the hologram line as a ListtimedEvent
- The timed event to runstartTimedEvent
- If timed even is starting right away
-
-
Method Detail
-
getViewer
public Viewer getViewer()
Gets viewer.- Returns:
- Get the Viewer
-
getHologramLines
public java.util.List<HologramLine> getHologramLines()
Gets hologram lines.- Returns:
- Get the list of HologramLines
-
getLocation
public org.bukkit.Location getLocation()
Gets location.- Returns:
- Get the Location
-
setText
public Hologram setText(java.lang.String text)
Set the Text of the first line TimedEvent is null CallssetText(int, String, TimedEvent, boolean)
- Parameters:
text
- The text- Returns:
- The Hologram
-
setText
public Hologram setText(int line, java.lang.String text)
Set the text of line x TimedEvent is null CallssetText(int, String, TimedEvent, boolean)
- Parameters:
line
- The line numbertext
- The text- Returns:
- The Hologram
-
setText
public Hologram setText(int line, java.lang.String text, TimedEvent timedEvent)
Set the text of line x and attach a TimedEvent Doesn't auto-start the TimedEvent CallssetText(int, String, TimedEvent, boolean)
- Parameters:
line
- The line numbertext
- The texttimedEvent
- The TimedEvent- Returns:
- The Hologram
-
setText
public Hologram setText(int line, java.lang.String text, TimedEvent timedEvent, boolean timedEventAutoStart)
Set the text of line x and attach a TimedEvent and say if it auto-starts- Parameters:
line
- The line numbertext
- The texttimedEvent
- The TimedEventtimedEventAutoStart
- If the TimedEvent auto-starts- Returns:
- The Hologram
-
setHologramLine
public Hologram setHologramLine(int line, java.lang.String text)
Sets hologram line.- Parameters:
line
- the linetext
- the text- Returns:
- the hologram line
-
setHologramLine
public Hologram setHologramLine(int line, java.lang.String text, TimedEvent timedEvent)
Sets hologram line.- Parameters:
line
- the linetext
- the texttimedEvent
- the timed event- Returns:
- the hologram line
-
setHologramLine
public Hologram setHologramLine(int line, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Sets hologram line.- Parameters:
line
- the linetext
- the texttimedEvent
- the timed eventstartTimedEvent
- the start timed event- Returns:
- the hologram line
-
addText
public Hologram addText(java.lang.String text)
Add text to the hologram TimedEvent is null CallsaddText(String, TimedEvent, boolean)
- Parameters:
text
- The text- Returns:
- The Hologram
-
addText
public Hologram addText(java.lang.String text, TimedEvent timedEvent)
Add text to the hologram with an attached TimedEvent TimedEvent doesn't auto-start CallsaddText(String, TimedEvent, boolean)
- Parameters:
text
- The texttimedEvent
- The TimedEvent- Returns:
- The hologram
-
addText
public Hologram addText(java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
Add text to the hologram with an attached TimedEvent and saying if it auto-starts- Parameters:
text
- The texttimedEvent
- The TimedEventstartTimedEvent
- If the TimedEvent auto-starts- Returns:
- The Hologram
-
addBlankLine
public Hologram addBlankLine()
Add a blank line to the Hologram- Returns:
- The Hologram
-
showPlayer
public void showPlayer(org.bukkit.entity.Player player)
Show the hologram to a player CallsshowPlayer(String)
- Parameters:
player
- The player
-
showPlayer
public void showPlayer(java.lang.String player)
Show the hologram to a player- Parameters:
player
- The player's name
-
remove
public void remove()
Remove the hologram and all the lines
-
remove
public void remove(java.lang.String player)
Remove the hologram from a player- Parameters:
player
- The player
-
remove
public void remove(org.bukkit.entity.Player player)
Remove the hologram from a player- Parameters:
player
- The player's name
-
-