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 class
ActionBar.ActionBarAPI
Actionbar for 1.11 and newerstatic class
ActionBar.ActionBarAPIOld
Actionbar 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 void
clear(org.bukkit.entity.Player player)
Clear the player's titlestatic ActionBar
getPlayingActionBar(org.bukkit.entity.Player player)
java.lang.String
getText()
int
getTime()
TimedEvent
getTimedEvent()
void
send(org.bukkit.entity.Player player)
Send the player an titlevoid
setText(java.lang.String text)
Set the textvoid
setTimedEvent(TimedEvent timedEvent)
Set the TimedEventvoid
stop(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:
getText
in classMessageDisplay
- Returns:
- Get the text
-
setText
public void setText(java.lang.String text)
Set the text- Specified by:
setText
in classMessageDisplay
- Parameters:
text
- The text to set
-
getTime
public int getTime()
- Specified by:
getTime
in classMessageDisplay
- Returns:
- Get the time
-
getTimedEvent
public TimedEvent getTimedEvent()
- Overrides:
getTimedEvent
in classTimedObject
- Returns:
- Get the TimedEvent
-
setTimedEvent
public void setTimedEvent(TimedEvent timedEvent)
Set the TimedEvent- Overrides:
setTimedEvent
in classTimedObject
- Parameters:
timedEvent
- The TimedEvent
-
stop
public void stop(org.bukkit.entity.Player player)
Stop showing the actionbar- Specified by:
stop
in classMessageDisplay
- Parameters:
player
- The player
-
send
public void send(org.bukkit.entity.Player player)
Send the player an title- Specified by:
send
in classMessageDisplay
- Parameters:
player
- The Player
-
-