Package me.neznamy.tab.api.protocol
Class PacketPlayOutBoss
java.lang.Object
me.neznamy.tab.api.protocol.PacketPlayOutBoss
- All Implemented Interfaces:
TabPacket
A class representing platform specific packet class
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enum representing all valid boss packet actions. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs new instance with given parameters andPacketPlayOutBoss.Action.REMOVE actionPacketPlayOutBoss(UUID id, boolean darkenScreen, boolean playMusic, boolean createWorldFog) Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_PROPERTIES actionPacketPlayOutBoss(UUID id, float pct) Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_PCT actionPacketPlayOutBoss(UUID id, String name) Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_NAME actionPacketPlayOutBoss(UUID id, String name, float pct, BarColor color, BarStyle overlay) Constructs new instance with given parameters andPacketPlayOutBoss.Action.ADD actionPacketPlayOutBoss(UUID id, BarColor color, BarStyle overlay) Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_STYLE action -
Method Summary
Modifier and TypeMethodDescriptionReturnsactiongetColor()ReturnscolorbytegetFlags()Returns bitmask based ondarkenScreen,playMusicanddarkenScreenvalues.getId()ReturnsidgetName()ReturnsnameReturnsoverlayfloatgetPct()ReturnspctbooleanReturnscreateWorldFogbooleanReturnsdarkenScreenbooleanReturnsplayMusicvoidsetCreateWorldFog(boolean createWorldFog) SetscreateWorldFogto specified valuevoidsetDarkenScreen(boolean darkenScreen) SetsdarkenScreento specified valuevoidsetPlayMusic(boolean playMusic) SetsplayMusicto specified valuetoString()Returns user-friendly string representation of the packet
-
Constructor Details
-
PacketPlayOutBoss
Constructs new instance with given parameters andPacketPlayOutBoss.Action.ADD action- Parameters:
id- BossBar uuidname- BossBar titlepct- BossBar progresscolor- BossBar coloroverlay- BossBar style
-
PacketPlayOutBoss
Constructs new instance with given parameters andPacketPlayOutBoss.Action.REMOVE action- Parameters:
id- BossBar uuid
-
PacketPlayOutBoss
Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_PCT action- Parameters:
id- BossBar uuidpct- BossBar progress
-
PacketPlayOutBoss
Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_NAME action- Parameters:
id- BossBar uuidname- BossBar title
-
PacketPlayOutBoss
Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_STYLE action- Parameters:
id- BossBar uuidcolor- BossBar coloroverlay- BossBar style
-
PacketPlayOutBoss
Constructs new instance with given parameters andPacketPlayOutBoss.Action.UPDATE_PROPERTIES action- Parameters:
darkenScreen- Darken screen flagplayMusic- Play music flagcreateWorldFog- Create fog flag
-
-
Method Details
-
getFlags
public byte getFlags()Returns bitmask based ondarkenScreen,playMusicanddarkenScreenvalues.darkenScreenadds1,playMusic2anddarkenScreen4to the final value.- Returns:
- the bitmask
-
toString
Description copied from interface:TabPacketReturns user-friendly string representation of the packet -
getColor
Returnscolor- Returns:
- color
-
getOverlay
Returnsoverlay- Returns:
- style
-
getName
Returnsname- Returns:
- name
-
getId
Returnsid- Returns:
- id
-
getPct
public float getPct()Returnspct- Returns:
- progress
-
getAction
Returnsaction- Returns:
- packet action
-
isDarkenScreen
public boolean isDarkenScreen()ReturnsdarkenScreen- Returns:
- darkenScreen
-
isCreateWorldFog
public boolean isCreateWorldFog()ReturnscreateWorldFog- Returns:
- createWorldFog
-
isPlayMusic
public boolean isPlayMusic()ReturnsplayMusic- Returns:
- playMusic
-
setDarkenScreen
public void setDarkenScreen(boolean darkenScreen) SetsdarkenScreento specified value- Parameters:
darkenScreen- Darken screen flag
-
setCreateWorldFog
public void setCreateWorldFog(boolean createWorldFog) SetscreateWorldFogto specified value- Parameters:
createWorldFog- Create fog flag
-
setPlayMusic
public void setPlayMusic(boolean playMusic) SetsplayMusicto specified value- Parameters:
playMusic- Play music flag
-