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(String teamName)
    • ClientboundSetPlayerTeamPacket

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

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

      public ClientboundSetPlayerTeamPacket(String teamName, net.kyori.adventure.text.Component displayName, net.kyori.adventure.text.Component playerPrefix, net.kyori.adventure.text.Component playerSuffix, boolean friendlyFire, boolean seeFriendlyInvisibles, NameTagVisibility nameTagVisibility, CollisionRule collisionRule, @Nullable TeamColor color, 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

      public String getTeamName()
    • getAction

      public TeamAction getAction()
    • getDisplayName

      public @Nullable net.kyori.adventure.text.Component getDisplayName()
    • getPlayerPrefix

      public @Nullable net.kyori.adventure.text.Component getPlayerPrefix()
    • getPlayerSuffix

      public @Nullable net.kyori.adventure.text.Component getPlayerSuffix()
    • getNameTagVisibility

      public @Nullable NameTagVisibility getNameTagVisibility()
    • getCollisionRule

      public @Nullable CollisionRule getCollisionRule()
    • getColor

      public @Nullable TeamColor getColor()
    • isFriendlyFire

      public boolean isFriendlyFire()
    • isSeeFriendlyInvisibles

      public boolean isSeeFriendlyInvisibles()
    • getPlayers

      public @Nullable String @Nullable [] getPlayers()
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • withTeamName

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

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

      public ClientboundSetPlayerTeamPacket withDisplayName(@Nullable 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).
    • withPlayerPrefix

      public ClientboundSetPlayerTeamPacket withPlayerPrefix(@Nullable net.kyori.adventure.text.Component playerPrefix)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withPlayerSuffix

      public ClientboundSetPlayerTeamPacket withPlayerSuffix(@Nullable net.kyori.adventure.text.Component playerSuffix)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withNameTagVisibility

      public 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 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 ClientboundSetPlayerTeamPacket withColor(@Nullable TeamColor color)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withFriendlyFire

      public 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 ClientboundSetPlayerTeamPacket withSeeFriendlyInvisibles(boolean seeFriendlyInvisibles)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withPlayers

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