Package me.neznamy.tab.api.protocol
Class PacketPlayOutScoreboardObjective
java.lang.Object
me.neznamy.tab.api.protocol.PacketPlayOutScoreboardObjective
- All Implemented Interfaces:
TabPacket
A class representing platform specific packet class
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enum representing available display types. -
Constructor Summary
ConstructorsConstructorDescriptionPacketPlayOutScoreboardObjective(int action, String objectiveName, String displayName, PacketPlayOutScoreboardObjective.EnumScoreboardHealthDisplay renderType) Constructs new instance with given parameters.PacketPlayOutScoreboardObjective(String objectiveName) Constructs new packet with given objective name and 1 (unregister) action. -
Method Summary
Modifier and TypeMethodDescriptionintReturnsactionReturnsdisplayNameReturnsobjectiveNameReturnsrenderTypetoString()Returns user-friendly string representation of the packet
-
Constructor Details
-
PacketPlayOutScoreboardObjective
public PacketPlayOutScoreboardObjective(int action, String objectiveName, String displayName, PacketPlayOutScoreboardObjective.EnumScoreboardHealthDisplay renderType) Constructs new instance with given parameters.- Parameters:
action- Packet action (0 = add, 1 = remove, 2 = update title)objectiveName- objective name, up to 16 characters longdisplayName- titlerenderType- display type- Throws:
IllegalArgumentException- ifobjectiveNameis null or longer than 16 characters
-
PacketPlayOutScoreboardObjective
Constructs new packet with given objective name and 1 (unregister) action.- Parameters:
objectiveName- objective name, up to 16 characters long- Throws:
IllegalArgumentException- ifobjectiveNameis null or longer than 16 characters
-
-
Method Details
-
toString
Description copied from interface:TabPacketReturns user-friendly string representation of the packet -
getDisplayName
ReturnsdisplayName- Returns:
- displayName
-
getObjectiveName
ReturnsobjectiveName- Returns:
- objectiveName
-
getRenderType
ReturnsrenderType- Returns:
- renderType
-
getAction
public int getAction()Returnsaction- Returns:
- packet action
-