Package me.bimmr.bimmcore.messages
Class ActionBar
- java.lang.Object
-
- me.bimmr.bimmcore.utils.timed.TimedObject
-
- me.bimmr.bimmcore.messages.MessageDisplay
-
- me.bimmr.bimmcore.messages.ActionBar
-
public class ActionBar extends MessageDisplay
A Utilities class to create an actionbar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classActionBar.ActionBarAPIActionbar for 1.11 and newerstatic classActionBar.ActionBarAPIOldActionbar for 1.7, 1.8, 1.9, 1.10 (Minecraft versions are odd)
-
Field Summary
-
Fields inherited from class me.bimmr.bimmcore.messages.MessageDisplay
text, time
-
Fields inherited from class me.bimmr.bimmcore.utils.timed.TimedObject
timedEvent
-
-
Constructor Summary
Constructors Constructor Description ActionBar(java.lang.String text)Create an actionbarActionBar(java.lang.String text, int time)Create an actionbarActionBar(java.lang.String text, int time, TimedEvent timedEvent)Create an actionbarActionBar(java.lang.String text, int time, TimedEvent timedEvent, boolean autoStartTimedEvent)Create an actionbarActionBar(java.lang.String text, TimedEvent timedEvent)Create an actionbarActionBar(java.lang.String text, TimedEvent timedEvent, boolean autoStartTimedEvent)Create an actionbar
-
Method Summary
Modifier and Type Method Description static voidclear(org.bukkit.entity.Player player)Clear the player's titlestatic ActionBargetPlayingActionBar(org.bukkit.entity.Player player)java.lang.StringgetText()intgetTime()TimedEventgetTimedEvent()voidsend(org.bukkit.entity.Player player)Send the player an titlevoidsetText(java.lang.String text)Set the textvoidsetTimedEvent(TimedEvent timedEvent)Set the TimedEventvoidstop(org.bukkit.entity.Player player)Stop showing the actionbar-
Methods inherited from class me.bimmr.bimmcore.utils.timed.TimedObject
isTaskRunning, onTaskRun, setTimedEvent, setTimedEvent, setTimedEvent, startTask, stopTask
-
-
-
-
Constructor Detail
-
ActionBar
public ActionBar(java.lang.String text)
Create an actionbar- Parameters:
text- The Text
-
ActionBar
public ActionBar(java.lang.String text, int time)Create an actionbar- Parameters:
text- The Texttime- The Time
-
ActionBar
public ActionBar(java.lang.String text, TimedEvent timedEvent)Create an actionbar- Parameters:
text- The TexttimedEvent- The TimedEvent
-
ActionBar
public ActionBar(java.lang.String text, TimedEvent timedEvent, boolean autoStartTimedEvent)Create an actionbar- Parameters:
text- The TexttimedEvent- The TimedEventautoStartTimedEvent- If the TimedEvent autostarts
-
ActionBar
public ActionBar(java.lang.String text, int time, TimedEvent timedEvent)Create an actionbar- Parameters:
text- The texttime- The timetimedEvent- If the TimedEvent Autostarts
-
ActionBar
public ActionBar(java.lang.String text, int time, TimedEvent timedEvent, boolean autoStartTimedEvent)Create an actionbar- Parameters:
text- The Texttime- The timetimedEvent- The TimedEventautoStartTimedEvent- If the TimedEvent autostarts
-
-
Method Detail
-
clear
public static void clear(org.bukkit.entity.Player player)
Clear the player's title- Parameters:
player- The Player
-
getPlayingActionBar
public static ActionBar getPlayingActionBar(org.bukkit.entity.Player player)
- Parameters:
player- The player- Returns:
- Get the actionbar that is being played for the player
-
getText
public java.lang.String getText()
- Specified by:
getTextin classMessageDisplay- Returns:
- Get the text
-
setText
public void setText(java.lang.String text)
Set the text- Specified by:
setTextin classMessageDisplay- Parameters:
text- The text to set
-
getTime
public int getTime()
- Specified by:
getTimein classMessageDisplay- Returns:
- Get the time
-
getTimedEvent
public TimedEvent getTimedEvent()
- Overrides:
getTimedEventin classTimedObject- Returns:
- Get the TimedEvent
-
setTimedEvent
public void setTimedEvent(TimedEvent timedEvent)
Set the TimedEvent- Overrides:
setTimedEventin classTimedObject- Parameters:
timedEvent- The TimedEvent
-
stop
public void stop(org.bukkit.entity.Player player)
Stop showing the actionbar- Specified by:
stopin classMessageDisplay- Parameters:
player- The player
-
send
public void send(org.bukkit.entity.Player player)
Send the player an title- Specified by:
sendin classMessageDisplay- Parameters:
player- The Player
-
-