public class ServerBossBar extends BossBar
BossBar.Color, BossBar.Style
Modifier and Type | Field and Description |
---|---|
private Set<ServerPlayerEntity> |
players |
private Set<ServerPlayerEntity> |
unmodifiablePlayers |
private boolean |
visible |
color, darkenSky, dragonMusic, name, percent, style, thickenFog
Constructor and Description |
---|
ServerBossBar(Text displayName,
BossBar.Color color,
BossBar.Style style) |
Modifier and Type | Method and Description |
---|---|
void |
addPlayer(ServerPlayerEntity player) |
void |
clearPlayers() |
Collection<ServerPlayerEntity> |
getPlayers() |
boolean |
isVisible() |
void |
removePlayer(ServerPlayerEntity player) |
private void |
sendPacket(BossBarS2CPacket.Type type) |
void |
setColor(BossBar.Color color) |
BossBar |
setDarkenSky(boolean darkenSky) |
BossBar |
setDragonMusic(boolean dragonMusic) |
void |
setName(Text name) |
void |
setOverlay(BossBar.Style style) |
void |
setPercent(float percentage) |
BossBar |
setThickenFog(boolean thickenFog) |
void |
setVisible(boolean visible) |
getColor, getDarkenSky, getName, getOverlay, getPercent, getThickenFog, getUuid, hasDragonMusic
private final Set<ServerPlayerEntity> players
private final Set<ServerPlayerEntity> unmodifiablePlayers
private boolean visible
public ServerBossBar(Text displayName, BossBar.Color color, BossBar.Style style)
public void setPercent(float percentage)
setPercent
in class BossBar
public void setColor(BossBar.Color color)
public void setOverlay(BossBar.Style style)
setOverlay
in class BossBar
public BossBar setDarkenSky(boolean darkenSky)
setDarkenSky
in class BossBar
public BossBar setDragonMusic(boolean dragonMusic)
setDragonMusic
in class BossBar
public BossBar setThickenFog(boolean thickenFog)
setThickenFog
in class BossBar
private void sendPacket(BossBarS2CPacket.Type type)
public void addPlayer(ServerPlayerEntity player)
public void removePlayer(ServerPlayerEntity player)
public void clearPlayers()
public boolean isVisible()
public void setVisible(boolean visible)
public Collection<ServerPlayerEntity> getPlayers()