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 int
private final ResourceLocation
private int
private int
Fields inherited from class net.minecraft.world.BossEvent
color, createWorldFog, darkenScreen, name, overlay, playBossMusic, progress
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOfflinePlayer
(UUID p_136271_) void
addPlayer
(ServerPlayer pPlayer) Makes the boss visible to the given player.final Component
int
getMax()
int
getValue()
static CustomBossEvent
load
(ResourceLocation pId, CustomBossEvent.Packed pPacked) void
onPlayerConnect
(ServerPlayer pPlayer) void
onPlayerDisconnect
(ServerPlayer pPlayer) pack()
void
void
removePlayer
(ServerPlayer pPlayer) Makes the boss non-visible to the given player.void
setMax
(int pMax) boolean
setPlayers
(Collection<ServerPlayer> pServerPlayerList) void
setValue
(int pValue) Methods inherited from class net.minecraft.server.level.ServerBossEvent
getPlayers, isVisible, setColor, setCreateWorldFog, setDarkenScreen, setName, setOverlay, setPlayBossMusic, setProgress, setVisible
Methods 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:
addPlayer
in classServerBossEvent
-
addOfflinePlayer
-
removePlayer
Makes the boss non-visible to the given player.- Overrides:
removePlayer
in classServerBossEvent
-
removeAllPlayers
public void removeAllPlayers()- Overrides:
removeAllPlayers
in 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
-