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 player) voidaddPlayer(ServerPlayer player) Makes the boss visible to the given player.final ComponentintgetMax()intgetValue()static CustomBossEventload(CompoundTag p_tag, ResourceLocation id, HolderLookup.Provider levelRegistry) voidonPlayerConnect(ServerPlayer player) voidonPlayerDisconnect(ServerPlayer player) voidvoidremovePlayer(ServerPlayer player) Makes the boss non-visible to the given player.save(HolderLookup.Provider levelRegistry) 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
-
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
-
save
-
load
public static CustomBossEvent load(CompoundTag p_tag, ResourceLocation id, HolderLookup.Provider levelRegistry) -
onPlayerConnect
-
onPlayerDisconnect
-