Class ClientboundBossEventPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundBossEventPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionClientboundBossEventPacket(@NonNull UUID uuid) ClientboundBossEventPacket(@NonNull UUID uuid, boolean darkenSky, boolean playEndMusic, boolean showFog) ClientboundBossEventPacket(@NonNull UUID uuid, float health) ClientboundBossEventPacket(@NonNull UUID uuid, @NonNull net.kyori.adventure.text.Component title) ClientboundBossEventPacket(@NonNull UUID uuid, @NonNull net.kyori.adventure.text.Component title, float health, @NonNull BossBarColor color, @NonNull BossBarDivision division, boolean darkenSky, boolean playEndMusic, boolean showFog) ClientboundBossEventPacket(@NonNull UUID uuid, @NonNull BossBarColor color, @NonNull BossBarDivision division) ClientboundBossEventPacket(io.netty.buffer.ByteBuf in) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboolean@NonNull BossBarActiongetColor()floatnet.kyori.adventure.text.ComponentgetTitle()@NonNull UUIDgetUuid()inthashCode()booleanbooleanbooleanvoidserialize(io.netty.buffer.ByteBuf out) booleanGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread.@NonNull StringtoString()@NonNull ClientboundBossEventPacketwithAction(@NonNull BossBarAction action) @NonNull ClientboundBossEventPacketwithColor(BossBarColor color) @NonNull ClientboundBossEventPacketwithDarkenSky(boolean darkenSky) @NonNull ClientboundBossEventPacketwithDivision(BossBarDivision division) @NonNull ClientboundBossEventPacketwithHealth(float health) @NonNull ClientboundBossEventPacketwithPlayEndMusic(boolean playEndMusic) @NonNull ClientboundBossEventPacketwithShowFog(boolean showFog) @NonNull ClientboundBossEventPacketwithTitle(net.kyori.adventure.text.Component title) @NonNull ClientboundBossEventPacketMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isTerminal
-
Constructor Details
-
ClientboundBossEventPacket
-
ClientboundBossEventPacket
public ClientboundBossEventPacket(@NonNull @NonNull UUID uuid, @NonNull @NonNull net.kyori.adventure.text.Component title) -
ClientboundBossEventPacket
-
ClientboundBossEventPacket
public ClientboundBossEventPacket(@NonNull @NonNull UUID uuid, @NonNull @NonNull BossBarColor color, @NonNull @NonNull BossBarDivision division) -
ClientboundBossEventPacket
public ClientboundBossEventPacket(@NonNull @NonNull UUID uuid, boolean darkenSky, boolean playEndMusic, boolean showFog) -
ClientboundBossEventPacket
public ClientboundBossEventPacket(@NonNull @NonNull UUID uuid, @NonNull @NonNull net.kyori.adventure.text.Component title, float health, @NonNull @NonNull BossBarColor color, @NonNull @NonNull BossBarDivision division, boolean darkenSky, boolean playEndMusic, boolean showFog) -
ClientboundBossEventPacket
public ClientboundBossEventPacket(io.netty.buffer.ByteBuf in)
-
-
Method Details
-
serialize
public void serialize(io.netty.buffer.ByteBuf out) - Specified by:
serializein interfaceMinecraftPacket
-
shouldRunOnGameThread
public boolean shouldRunOnGameThread()Description copied from interface:PacketGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread. Packets that qualify for this are usually packets with an ensureRunningOnSameThread call at the top of their packet listener method in the Minecraft code. Packets which need extra attention because they aren't "fully" handled async are marked using // GAME THREAD DETAIL comments in the MCProtocolLib code.- Specified by:
shouldRunOnGameThreadin interfacePacket- Returns:
- Whether the packet be handled async from the Netty thread.
-
getUuid
-
getAction
-
getTitle
public net.kyori.adventure.text.Component getTitle() -
getHealth
public float getHealth() -
getColor
-
getDivision
-
isDarkenSky
public boolean isDarkenSky() -
isPlayEndMusic
public boolean isPlayEndMusic() -
isShowFog
public boolean isShowFog() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withUuid
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withAction
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTitle
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHealth
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withColor
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDivision
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDarkenSky
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withPlayEndMusic
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withShowFog
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-