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 classes/interfaces inherited from class net.minecraft.world.BossEvent
BossEvent.BossBarColor, BossEvent.BossBarOverlay -
Field Summary
FieldsFields 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(CompoundTag pTag, ResourceLocation pId, HolderLookup.Provider pLevelRegistry) voidonPlayerConnect(ServerPlayer pPlayer) voidonPlayerDisconnect(ServerPlayer pPlayer) voidvoidremovePlayer(ServerPlayer pPlayer) Makes the boss non-visible to the given player.save(HolderLookup.Provider pLevelRegistry) 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
-
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
-
save
-
load
public static CustomBossEvent load(CompoundTag pTag, ResourceLocation pId, HolderLookup.Provider pLevelRegistry) -
onPlayerConnect
-
onPlayerDisconnect
-