Class CustomBossEvent
java.lang.Object
net.minecraft.world.BossEvent
net.minecraft.server.level.ServerBossEvent
net.minecraft.server.bossevents.CustomBossEvent
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class BossEvent
BossEvent.BossBarColor, BossEvent.BossBarOverlay -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Identifierprivate static final intprivate final Runnableprivate intprivate intFields inherited from class BossEvent
color, createWorldFog, darkenScreen, name, overlay, playBossMusic, progress -
Constructor Summary
ConstructorsConstructorDescriptionCustomBossEvent(UUID id, Identifier customId, Component name, Runnable dirtyCallback) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlayer(ServerPlayer player) customId()final Componentstatic CustomBossEventload(UUID id, Identifier customId, CustomBossEvent.Packed packed, Runnable setDirty) intmax()voidonPlayerConnect(ServerPlayer player) voidonPlayerDisconnect(ServerPlayer player) pack()voidvoidremovePlayer(ServerPlayer player) voidsetDirty()voidsetMax(int max) booleansetPlayers(Collection<ServerPlayer> players) voidsetValue(int value) intvalue()Methods inherited from class ServerBossEvent
getPlayers, isVisible, setColor, setCreateWorldFog, setDarkenScreen, setName, setOverlay, setPlayBossMusic, setProgress, setVisibleMethods inherited from class BossEvent
getColor, getId, getName, getOverlay, getProgress, shouldCreateWorldFog, shouldDarkenScreen, shouldPlayBossMusic
-
Field Details
-
DEFAULT_MAX
private static final int DEFAULT_MAX- See Also:
-
customId
-
players
-
value
private int value -
max
private int max -
dirtyCallback
-
-
Constructor Details
-
CustomBossEvent
-
-
Method Details
-
customId
-
addPlayer
- Overrides:
addPlayerin classServerBossEvent
-
removePlayer
- Overrides:
removePlayerin classServerBossEvent
-
removeAllPlayers
public void removeAllPlayers()- Overrides:
removeAllPlayersin classServerBossEvent
-
value
public int value() -
max
public int max() -
setValue
public void setValue(int value) -
setMax
public void setMax(int max) -
getDisplayName
-
setPlayers
-
load
public static CustomBossEvent load(UUID id, Identifier customId, CustomBossEvent.Packed packed, Runnable setDirty) -
pack
-
onPlayerConnect
-
onPlayerDisconnect
-
setDirty
public void setDirty()- Overrides:
setDirtyin classServerBossEvent
-