Class ClientboundSetPlayerTeamPacket

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

public class ClientboundSetPlayerTeamPacket extends Object implements MinecraftPacket
  • Constructor Details

    • ClientboundSetPlayerTeamPacket

      public ClientboundSetPlayerTeamPacket(@NonNull @NonNull String teamName)
    • ClientboundSetPlayerTeamPacket

      public ClientboundSetPlayerTeamPacket(@NonNull @NonNull String teamName, @NonNull @NonNull net.kyori.adventure.text.Component displayName, @NonNull @NonNull net.kyori.adventure.text.Component prefix, @NonNull @NonNull net.kyori.adventure.text.Component suffix, boolean friendlyFire, boolean seeFriendlyInvisibles, @NonNull @NonNull NameTagVisibility nameTagVisibility, @NonNull @NonNull CollisionRule collisionRule, @NonNull @NonNull TeamColor color)
    • ClientboundSetPlayerTeamPacket

      public ClientboundSetPlayerTeamPacket(@NonNull @NonNull String teamName, @NonNull @NonNull TeamAction action, @NonNull @NonNull String[] players)
    • ClientboundSetPlayerTeamPacket

      public ClientboundSetPlayerTeamPacket(@NonNull @NonNull String teamName, @NonNull @NonNull net.kyori.adventure.text.Component displayName, @NonNull @NonNull net.kyori.adventure.text.Component prefix, @NonNull @NonNull net.kyori.adventure.text.Component suffix, boolean friendlyFire, boolean seeFriendlyInvisibles, @NonNull @NonNull NameTagVisibility nameTagVisibility, @NonNull @NonNull CollisionRule collisionRule, @NonNull @NonNull TeamColor color, @NonNull @NonNull String[] players)
    • ClientboundSetPlayerTeamPacket

      public ClientboundSetPlayerTeamPacket(io.netty.buffer.ByteBuf in)
  • Method Details

    • serialize

      public void serialize(io.netty.buffer.ByteBuf out)
      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.
    • getTeamName

      @NonNull public @NonNull String getTeamName()
    • getAction

      @NonNull public @NonNull TeamAction getAction()
    • getDisplayName

      public net.kyori.adventure.text.Component getDisplayName()
    • getPrefix

      public net.kyori.adventure.text.Component getPrefix()
    • getSuffix

      public net.kyori.adventure.text.Component getSuffix()
    • isFriendlyFire

      public boolean isFriendlyFire()
    • isSeeFriendlyInvisibles

      public boolean isSeeFriendlyInvisibles()
    • getNameTagVisibility

      public @Nullable NameTagVisibility getNameTagVisibility()
    • getCollisionRule

      public @Nullable CollisionRule getCollisionRule()
    • getColor

      public TeamColor getColor()
    • getPlayers

      public String[] getPlayers()
    • 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
    • withTeamName

      public @NonNull ClientboundSetPlayerTeamPacket withTeamName(@NonNull @NonNull String teamName)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withAction

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

      public @NonNull ClientboundSetPlayerTeamPacket withDisplayName(net.kyori.adventure.text.Component displayName)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withPrefix

      public @NonNull ClientboundSetPlayerTeamPacket withPrefix(net.kyori.adventure.text.Component prefix)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withSuffix

      public @NonNull ClientboundSetPlayerTeamPacket withSuffix(net.kyori.adventure.text.Component suffix)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withFriendlyFire

      public @NonNull ClientboundSetPlayerTeamPacket withFriendlyFire(boolean friendlyFire)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withSeeFriendlyInvisibles

      public @NonNull ClientboundSetPlayerTeamPacket withSeeFriendlyInvisibles(boolean seeFriendlyInvisibles)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withNameTagVisibility

      public @NonNull ClientboundSetPlayerTeamPacket withNameTagVisibility(@Nullable NameTagVisibility nameTagVisibility)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCollisionRule

      public @NonNull ClientboundSetPlayerTeamPacket withCollisionRule(@Nullable CollisionRule collisionRule)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withColor

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

      public @NonNull ClientboundSetPlayerTeamPacket withPlayers(String[] players)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).