github.com/df-mc/dragonfly@v0.9.13/server/player/bossbar/colour.go (about) 1 package bossbar 2 3 // Colour is the colour of a BossBar. 4 type Colour struct{ colour } 5 6 // Grey is the colour for a grey boss bar. 7 func Grey() Colour { 8 return Colour{colour(0)} 9 } 10 11 // Blue is the colour for a blue boss bar. 12 func Blue() Colour { 13 return Colour{colour(1)} 14 } 15 16 // Red is the colour for a red boss bar. 17 func Red() Colour { 18 return Colour{colour(2)} 19 } 20 21 // Green is the colour for a green boss bar. 22 func Green() Colour { 23 return Colour{colour(3)} 24 } 25 26 // Yellow is the colour for a yellow boss bar. 27 func Yellow() Colour { 28 return Colour{colour(4)} 29 } 30 31 // Purple is the colour for a purple boss bar. 32 func Purple() Colour { 33 return Colour{colour(5)} 34 } 35 36 // White is the colour for a white boss bar. 37 func White() Colour { 38 return Colour{colour(6)} 39 } 40 41 type colour uint8 42 43 func (c colour) Uint8() uint8 { 44 return uint8(c) 45 }