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 pPlayer) voidaddPlayer(ServerPlayer pPlayer) Makes the boss visible to the given player.final ComponentintgetMax()intgetValue()static CustomBossEventload(ResourceLocation pId, CustomBossEvent.Packed pPacked) voidonPlayerConnect(ServerPlayer pPlayer) voidonPlayerDisconnect(ServerPlayer pPlayer) pack()voidvoidremovePlayer(ServerPlayer pPlayer) Makes the boss non-visible to the given player.voidsetMax(int pMax) booleansetPlayers(Collection<ServerPlayer> pServerPlayerList) voidsetValue(int pValue) 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 pValue) -
setMax
public void setMax(int pMax) -
getDisplayName
-
setPlayers
-
load
-
pack
-
onPlayerConnect
-
onPlayerDisconnect
-