Package ml.karmaconfigs.api.common.boss
Class BossProvider<T>
java.lang.Object
ml.karmaconfigs.api.common.boss.BossProvider<T>
- Type Parameters:
T- the bar provider ( target type to display to )
Karma boss bar provider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcancel()Destroy the current boss barabstract BossProvider<T>Set the boss bar colorprotected abstract voiddisplayBar(Collection<T> paramCollection)Display the boss bar to the specified playersabstract BossProvider<T>displayTime(double paramDouble)Set the boss bar display timeabstract intgetBarId()Get the current boss bar idabstract intGet the amount of bars that existabstract BossColorgetColor()Get the boss bar colorabstract BossTypegetStyle()Get the boss bar styleabstract StringgetTitle()Get the boss bar titleabstract booleanGet if the boss bar is cancelledabstract booleanisValid()Get if the boss bar is validabstract BossProvider<T>progress(ProgressiveBar paramProgressiveBar)Set the boss bar progress typeabstract voidscheduleBar(Collection<T> paramCollection)Schedule the bar to the specified playersabstract voidscheduleBar(T paramT)Schedule the bar to the specified playerabstract BossProvider<T>Set the boss bar styleabstract booleanUpdate the boss bar
-
Constructor Details
-
BossProvider
public BossProvider()
-
-
Method Details
-
color
Set the boss bar color- Parameters:
paramBossColor- the boss bar color- Returns:
- this boss bar instance
-
style
Set the boss bar style- Parameters:
paramBossType- the boss bar style- Returns:
- this boss bar instance
-
progress
Set the boss bar progress type- Parameters:
paramProgressiveBar- the boss bar progress type- Returns:
- this boss bar instance
-
cancel
public abstract void cancel()Destroy the current boss bar -
displayBar
Display the boss bar to the specified players- Parameters:
paramCollection- the players to display to
-
scheduleBar
Schedule the bar to the specified players- Parameters:
paramCollection- the players to display to
-
scheduleBar
Schedule the bar to the specified player- Parameters:
paramT- the player to display to
-
getBarsAmount
public abstract int getBarsAmount()Get the amount of bars that exist- Returns:
- the amount of bars created
-
getBarId
public abstract int getBarId()Get the current boss bar id- Returns:
- the current boss bar id
-
update
Update the boss bar- Parameters:
paramString- the new boss bar textparamBoolean- restart the bar progress- Returns:
- if the boss bar could be updated
-
displayTime
Set the boss bar display time- Parameters:
paramDouble- the boss bar display time- Returns:
- the boss bar display time
-
isValid
public abstract boolean isValid()Get if the boss bar is valid- Returns:
- if the boss bar is valid
-
isCancelled
public abstract boolean isCancelled()Get if the boss bar is cancelled- Returns:
- if the boss bar is cancelled
-
getTitle
Get the boss bar title- Returns:
- the boss bar title
-
getColor
Get the boss bar color- Returns:
- the boss bar color
-
getStyle
Get the boss bar style- Returns:
- the boss bar style
-