Package me.bimmr.bimmcore.messages
Class BossBar
- java.lang.Object
-
- me.bimmr.bimmcore.utils.timed.TimedObject
-
- me.bimmr.bimmcore.messages.MessageDisplay
-
- me.bimmr.bimmcore.messages.BossBar
-
public class BossBar extends MessageDisplay
A wrapper for the Bukkit BossBar API
-
-
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 BossBar(java.lang.String text)Create a BossbarBossBar(java.lang.String text, int time)Create a BossBarBossBar(java.lang.String text, int time, TimedEvent timedEvent)Create a BossBarBossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle)Create a BossBar progress = 1.0BossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, java.lang.Double progress)Create a BossBarBossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, java.lang.Double progress, TimedEvent timedEvent)Create a BossBarBossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, TimedEvent timedEvent)Create a BossBar progress = 1.0BossBar(java.lang.String text, TimedEvent timedEvent)Create a Bossbar
-
Method Summary
Modifier and Type Method Description static voidclear(org.bukkit.entity.Player player)Clear the BossBar being shown to the playerstatic BossBargetBossBar(org.bukkit.entity.Player player)Gets boss bar.org.bukkit.boss.BossBargetBukkitBar()Gets bukkit bar.java.lang.StringgetText()intgetTime()Get the timeTimedEventgetTimedEvent()Gets timed event.voidsend(org.bukkit.entity.Player player)Sends a BossBar for a set amount of timevoidsetText(java.lang.String text)Set the textvoidsetTimedEvent(TimedEvent timedEvent)Set the TimedEventvoidstop(org.bukkit.entity.Player player)Clear the bossbar off the players screen-
Methods inherited from class me.bimmr.bimmcore.utils.timed.TimedObject
isTaskRunning, onTaskRun, setTimedEvent, setTimedEvent, setTimedEvent, startTask, stopTask
-
-
-
-
Constructor Detail
-
BossBar
public BossBar(java.lang.String text)
Create a Bossbartime = 2 color = white style = solid progress = 1.0
- Parameters:
text- The Text
-
BossBar
public BossBar(java.lang.String text, int time)Create a BossBarcolor = white style = solid progress = 1.0
- Parameters:
text- The Texttime- The Time
-
BossBar
public BossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle)Create a BossBar progress = 1.0- Parameters:
text- The texttime- The timebarColor- the BarcolorbarStyle- The Barstyle
-
BossBar
public BossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, java.lang.Double progress)Create a BossBar- Parameters:
text- The texttime- The TimebarColor- The BarcolorbarStyle- The BarStyleprogress- The progress
-
BossBar
public BossBar(java.lang.String text, TimedEvent timedEvent)Create a Bossbartime = 2 color = white style = solid progress = 1.0
- Parameters:
text- The texttimedEvent- The TimedEvent
-
BossBar
public BossBar(java.lang.String text, int time, TimedEvent timedEvent)Create a BossBarcolor = white style = solid progress = 1.0
- Parameters:
text- The texttime- The timetimedEvent- The TimedEvent
-
BossBar
public BossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, TimedEvent timedEvent)Create a BossBar progress = 1.0- Parameters:
text- The texttime- The timebarColor- The bar colorbarStyle- The bar styletimedEvent- The TimedEvent
-
BossBar
public BossBar(java.lang.String text, int time, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, java.lang.Double progress, TimedEvent timedEvent)Create a BossBar- Parameters:
text- The texttime- The timebarColor- The bar colorbarStyle- The bar styleprogress- The bar's progresstimedEvent- The TimedEvent
-
-
Method Detail
-
clear
public static void clear(org.bukkit.entity.Player player)
Clear the BossBar being shown to the player- Parameters:
player- the player
-
getBossBar
public static BossBar getBossBar(org.bukkit.entity.Player player)
Gets boss bar.- Parameters:
player- The player- Returns:
- Get the BossBar being shown to the player
-
getTime
public int getTime()
Get the time- Specified by:
getTimein classMessageDisplay- Returns:
- the time left
-
stop
public void stop(org.bukkit.entity.Player player)
Clear the bossbar off the players screen- Specified by:
stopin classMessageDisplay- Parameters:
player- The player
-
getBukkitBar
public org.bukkit.boss.BossBar getBukkitBar()
Gets bukkit bar.- Returns:
- Get the BukkitBossBar
-
getTimedEvent
public TimedEvent getTimedEvent()
Gets timed event.- Overrides:
getTimedEventin classTimedObject- Returns:
- Get the TimedEvent
-
setTimedEvent
public void setTimedEvent(TimedEvent timedEvent)
Set the TimedEvent- Overrides:
setTimedEventin classTimedObject- Parameters:
timedEvent- The TimedEvent
-
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
-
send
public void send(org.bukkit.entity.Player player)
Sends a BossBar for a set amount of time- Specified by:
sendin classMessageDisplay- Parameters:
player- The player
-
-