Class ClientboundBossEventPacket

java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundBossEventPacket
All Implemented Interfaces:
Packet, MinecraftPacket

public class ClientboundBossEventPacket extends Object implements MinecraftPacket
  • Constructor Details

    • ClientboundBossEventPacket

      public ClientboundBossEventPacket(@NonNull @NonNull UUID uuid)
    • ClientboundBossEventPacket

      public ClientboundBossEventPacket(@NonNull @NonNull UUID uuid, @NonNull @NonNull net.kyori.adventure.text.Component title)
    • ClientboundBossEventPacket

      public ClientboundBossEventPacket(@NonNull @NonNull UUID uuid, float health)
    • 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, MinecraftCodecHelper helper)
  • Method Details

    • serialize

      public void serialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper)
      Specified by:
      serialize in interface MinecraftPacket
    • shouldRunOnGameThread

      public boolean shouldRunOnGameThread()
      Description copied from interface: Packet
      Gets 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:
      shouldRunOnGameThread in interface Packet
      Returns:
      Whether the packet be handled async from the Netty thread.
    • getUuid

      @NonNull public @NonNull UUID getUuid()
    • getAction

      @NonNull public @NonNull BossBarAction getAction()
    • getTitle

      public net.kyori.adventure.text.Component getTitle()
    • getHealth

      public float getHealth()
    • getColor

      public BossBarColor getColor()
    • getDivision

      public BossBarDivision getDivision()
    • isDarkenSky

      public boolean isDarkenSky()
    • isPlayEndMusic

      public boolean isPlayEndMusic()
    • isShowFog

      public boolean isShowFog()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object
    • withUuid

      public @NonNull ClientboundBossEventPacket withUuid(@NonNull @NonNull UUID uuid)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withAction

      public @NonNull ClientboundBossEventPacket withAction(@NonNull @NonNull BossBarAction action)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withTitle

      public @NonNull ClientboundBossEventPacket withTitle(net.kyori.adventure.text.Component title)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withHealth

      public @NonNull ClientboundBossEventPacket withHealth(float health)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withColor

      public @NonNull ClientboundBossEventPacket withColor(BossBarColor color)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDivision

      public @NonNull ClientboundBossEventPacket withDivision(BossBarDivision division)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDarkenSky

      public @NonNull ClientboundBossEventPacket withDarkenSky(boolean darkenSky)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withPlayEndMusic

      public @NonNull ClientboundBossEventPacket withPlayEndMusic(boolean playEndMusic)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withShowFog

      public @NonNull ClientboundBossEventPacket withShowFog(boolean showFog)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).