Documentation ¶
Overview ¶
Package bossbar provides a way to create and manage Minecraft boss bars for players.
Index ¶
Constants ¶
View Source
const ( PinkColor = Color(packet.PinkColor) BlueColor = Color(packet.BlueColor) RedColor = Color(packet.RedColor) GreenColor = Color(packet.GreenColor) YellowColor = Color(packet.YellowColor) PurpleColor = Color(packet.PurpleColor) WhiteColor = Color(packet.WhiteColor) )
Available boss bar colors.
View Source
const ( // MinProgress is the minimum value the progress can be. MinProgress float32 = 0.0 // MaxProgress is the maximum value the progress can be. MaxProgress float32 = 1.0 )
View Source
const ( ProgressOverlay = Overlay(packet.ProgressOverlay) Notched6Overlay = Overlay(packet.Notched6Overlay) Notched10Overlay = Overlay(packet.Notched10Overlay) Notched12Overlay = Overlay(packet.Notched12Overlay) Notched20Overlay = Overlay(packet.Notched20Overlay) )
Available boss bar overlays.
View Source
const ( DarkenScreenFlag = Flag(packet.DarkenScreenFlag) PlayBossMusicFlag = Flag(packet.PlayBossMusicFlag) CreateWorldFogFlag = Flag(packet.CreateWorldFogFlag) )
Available boss bar flags.
Variables ¶
View Source
var Colors = []Color{ PinkColor, BlueColor, RedColor, GreenColor, YellowColor, PurpleColor, WhiteColor, }
Colors is a list of available boss bar colors.
Functions ¶
func RemoveAllViewers ¶
func RemoveAllViewers(b BossBar)
RemoveAllViewers removes all viewers from the boss bar.
Types ¶
type BossBar ¶
type BossBar interface { // Viewers returns the viewers of this boss bar. Viewers() []Viewer // AddViewer adds the specified viewer to the boss bar's viewers AddViewer(Viewer) error // RemoveViewer removes the specified viewer from the boss bar's viewers RemoveViewer(Viewer) error // ID returns the boss bar's ID. ID() uuid.UUID // Name returns the name of this boss bar. Name() component.Component // SetName sets the name of this boss bar. SetName(component.Component) // Color returns the color of this boss bar. Color() Color // SetColor sets the color of this boss bar. SetColor(Color) // Percent returns the percent of this boss bar. Percent() float32 // SetPercent sets the percent of this boss bar. SetPercent(float32) // Flags returns the flags of this boss bar. Flags() []Flag // SetFlags sets the flags of this boss bar. SetFlags([]Flag) // Overlay returns the overlay of this boss bar. Overlay() Overlay // SetOverlay sets the overlay of this boss bar. SetOverlay(Overlay) }
BossBar is a boss bar.
Click to show internal directories.
Click to hide internal directories.