Package me.neznamy.tab.api.protocol
Class PacketPlayOutScoreboardTeam
java.lang.Object
me.neznamy.tab.api.protocol.PacketPlayOutScoreboardTeam
- All Implemented Interfaces:
TabPacket
A class representing platform specific packet class
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs new instance with given parameters and 1 (REMOVE) actionPacketPlayOutScoreboardTeam(String team, String prefix, String suffix, String visibility, String collision, int options) Constructs new instance with given parameters and 2 (UPDATE_TEAM_INFO) actionPacketPlayOutScoreboardTeam(String team, String prefix, String suffix, String visibility, String collision, Collection<String> players, int options) Constructs new instance with given parameters and 0 (CREATE) actionPacketPlayOutScoreboardTeam(String team, Collection<String> players, boolean add) Constructs new instance with given parameters and 3 (ADD_PLAYERS) ifaddistrue, 4 (REMOVE_PLAYERS) ifaddisfalseaction. -
Method Summary
Modifier and TypeMethodDescriptionintReturnsactionReturnscollisionRulegetColor()ReturnscolorgetName()ReturnsnameReturnsnameTagVisibilityintReturnsoptionsReturnsplayerPrefixReturnsplayersReturnsplayerSuffixvoidsetColor(EnumChatFormat color) Setscolorto specified colortoString()Returns user-friendly string representation of the packet
-
Constructor Details
-
PacketPlayOutScoreboardTeam
public PacketPlayOutScoreboardTeam(String team, String prefix, String suffix, String visibility, String collision, Collection<String> players, int options) Constructs new instance with given parameters and 0 (CREATE) action- Parameters:
team- Team name, up to 16 characters longprefix- Prefix of players in teamsuffix- Suffix of players in teamvisibility- NameTag visibility rulecollision- Collision ruleplayers- Affected entitiesoptions- bitmask of team options- Throws:
IllegalArgumentException- ifnameis null, empty or longer than 16 characters
-
PacketPlayOutScoreboardTeam
Constructs new instance with given parameters and 1 (REMOVE) action- Parameters:
team- Team name, up to 16 characters long- Throws:
IllegalArgumentException- ifnameis null, empty or longer than 16 characters
-
PacketPlayOutScoreboardTeam
public PacketPlayOutScoreboardTeam(String team, String prefix, String suffix, String visibility, String collision, int options) Constructs new instance with given parameters and 2 (UPDATE_TEAM_INFO) action- Parameters:
team- Team name, up to 16 characters longprefix- Prefix of players in teamsuffix- Suffix of players in teamvisibility- NameTag visibility rulecollision- Collision ruleoptions- bitmask of team options- Throws:
IllegalArgumentException- ifnameis null, empty or longer than 16 characters
-
PacketPlayOutScoreboardTeam
Constructs new instance with given parameters and 3 (ADD_PLAYERS) ifaddistrue, 4 (REMOVE_PLAYERS) ifaddisfalseaction.- Parameters:
team- Team name, up to 16 characters longplayers- Affected entitiesadd-trueif players should be added,falseif removed from team- Throws:
IllegalArgumentException- ifnameis null, empty or longer than 16 characters
-
-
Method Details
-
toString
Description copied from interface:TabPacketReturns user-friendly string representation of the packet -
getName
Returnsname- Returns:
- team name
-
getPlayerPrefix
ReturnsplayerPrefix- Returns:
- playerPrefix
-
getPlayerSuffix
ReturnsplayerSuffix- Returns:
- playerSuffix
-
getNameTagVisibility
ReturnsnameTagVisibility- Returns:
- nameTagVisibility
-
getCollisionRule
ReturnscollisionRule- Returns:
- collisionRule
-
setColor
Setscolorto specified color- Parameters:
color- color to use
-
getColor
Returnscolor- Returns:
- color
-
getPlayers
Returnsplayers- Returns:
- players
-
getOptions
public int getOptions()Returnsoptions- Returns:
- team options
-
getAction
public int getAction()Returnsaction- Returns:
- packet action
-