Package net.minecraft.server.bossevents
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 net.minecraft.world.BossEvent
BossEvent.BossBarColor, BossEvent.BossBarOverlay -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final ResourceLocationprivate intprivate intFields inherited from class net.minecraft.world.BossEvent
color, createWorldFog, darkenScreen, name, overlay, playBossMusic, progress -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOfflinePlayer(UUID player) voidaddPlayer(ServerPlayer player) Makes the boss visible to the given player.final ComponentintgetMax()intgetValue()static CustomBossEventload(ResourceLocation id, CustomBossEvent.Packed packed) voidonPlayerConnect(ServerPlayer player) voidonPlayerDisconnect(ServerPlayer player) pack()voidvoidremovePlayer(ServerPlayer player) Makes the boss non-visible to the given player.voidsetMax(int max) booleansetPlayers(Collection<ServerPlayer> serverPlayerList) voidsetValue(int value) Methods inherited from class net.minecraft.server.level.ServerBossEvent
getPlayers, isVisible, setColor, setCreateWorldFog, setDarkenScreen, setName, setOverlay, setPlayBossMusic, setProgress, setVisibleMethods inherited from class net.minecraft.world.BossEvent
getColor, getId, getName, getOverlay, getProgress, shouldCreateWorldFog, shouldDarkenScreen, shouldPlayBossMusic
-
Field Details
-
DEFAULT_MAX
private static final int DEFAULT_MAX- See Also:
-
id
-
players
-
value
private int value -
max
private int max
-
-
Constructor Details
-
CustomBossEvent
-
-
Method Details
-
getTextId
-
addPlayer
Makes the boss visible to the given player.- Overrides:
addPlayerin classServerBossEvent
-
addOfflinePlayer
-
removePlayer
Makes the boss non-visible to the given player.- Overrides:
removePlayerin classServerBossEvent
-
removeAllPlayers
public void removeAllPlayers()- Overrides:
removeAllPlayersin classServerBossEvent
-
getValue
public int getValue() -
getMax
public int getMax() -
setValue
public void setValue(int value) -
setMax
public void setMax(int max) -
getDisplayName
-
setPlayers
-
load
-
pack
-
onPlayerConnect
-
onPlayerDisconnect
-