@@ -29,15 +29,15 @@ public class serverInfoPackets {
2929 *
3030 * @param inRound boolean, Is the client in a round?
3131 *
32- * @param playerStatus byte[]. In Round: 0 - Dead, 1 - Alive;<br>
33- * In Lobby: 0 - Not Ready, 1 - Ready
32+ * @param playerStatus byte[]. In Round: 0 - Dead; 1 - Alive; -1 - Spectating ;<br>
33+ * In Lobby: 0 - Not Ready; 1 - Ready
3434 *
3535 * @see gamemodePacket gamemodePacket
3636 * @see playerStatusPacket playerStatusPacket
3737 * @see inRoundPacket inRoundPacket
3838 */
3939 public record serverInfoPacket (ServerInfoData .MINIGAME_TYPES minigame , ServerInfoData .GAME_MODES gamemode , boolean inRound , byte [] playerStatus ) implements CustomPayload {
40- public static final Id <serverInfoPacket > PACKET_ID = new Id <>(Identifier .of ("serverInfo " , "serverInfo_set " ));
40+ public static final Id <serverInfoPacket > PACKET_ID = new Id <>(Identifier .of ("serverinfo " , "serverinfo_set " ));
4141 public static final PacketCodec <RegistryByteBuf , serverInfoPacket > codec = PacketCodec .tuple (
4242 PacketCodecs .indexed (i -> ServerInfoData .MINIGAME_TYPES .values ()[i ], ServerInfoData .MINIGAME_TYPES ::ordinal ), serverInfoPacket ::minigame ,
4343 PacketCodecs .indexed (i -> ServerInfoData .GAME_MODES .values ()[i ], ServerInfoData .GAME_MODES ::ordinal ), serverInfoPacket ::gamemode ,
@@ -63,7 +63,7 @@ public Id<? extends CustomPayload> getId() {
6363 @ SuppressWarnings ("DeprecatedIsStillUsed" )
6464 @ Deprecated
6565 public record minigamePacket (ServerInfoData .MINIGAME_TYPES minigame ) implements CustomPayload {
66- public static final Id <minigamePacket > PACKET_ID = new Id <>(Identifier .of ("serverInfo " , "minigame_set" ));
66+ public static final Id <minigamePacket > PACKET_ID = new Id <>(Identifier .of ("serverinfo " , "minigame_set" ));
6767 public static final PacketCodec <RegistryByteBuf , minigamePacket > codec = PacketCodec .tuple (
6868 PacketCodecs .indexed (i -> ServerInfoData .MINIGAME_TYPES .values ()[i ], ServerInfoData .MINIGAME_TYPES ::ordinal ), minigamePacket ::minigame ,
6969 minigamePacket ::new
@@ -83,7 +83,7 @@ public Id<? extends CustomPayload> getId() {
8383 *
8484 */
8585 public record gamemodePacket (ServerInfoData .GAME_MODES gamemode ) implements CustomPayload {
86- public static final Id <gamemodePacket > PACKET_ID = new Id <>(Identifier .of ("serverInfo " , "gamemode_set" ));
86+ public static final Id <gamemodePacket > PACKET_ID = new Id <>(Identifier .of ("serverinfo " , "gamemode_set" ));
8787 public static final PacketCodec <RegistryByteBuf , gamemodePacket > codec = PacketCodec .tuple (
8888 PacketCodecs .indexed (i -> ServerInfoData .GAME_MODES .values ()[i ], ServerInfoData .GAME_MODES ::ordinal ), gamemodePacket ::gamemode ,
8989 gamemodePacket ::new
@@ -102,7 +102,7 @@ public Id<? extends CustomPayload> getId() {
102102 * @param inRound boolean, Is the client in a round?
103103 */
104104 public record inRoundPacket (boolean inRound ) implements CustomPayload {
105- public static final Id <inRoundPacket > PACKET_ID = new Id <>(Identifier .of ("serverInfo " , "inRound_set " ));
105+ public static final Id <inRoundPacket > PACKET_ID = new Id <>(Identifier .of ("serverinfo " , "inround_set " ));
106106 public static final PacketCodec <RegistryByteBuf , inRoundPacket > codec = PacketCodec .tuple (
107107 PacketCodecs .BOOL , inRoundPacket ::inRound ,
108108 inRoundPacket ::new
@@ -117,14 +117,14 @@ public Id<? extends CustomPayload> getId() {
117117 /**
118118 * <pre>playerStatusPacket, sends player statuses to client.
119119 *
120- * <code>new byte[]{0,1,0,1}</code> 4 players, players 1 & 3 are either not ready or dead.
120+ * <code>new byte[]{0,1,0,- 1}</code> 4 players, players 1 & 3 are either not ready or dead, player 4 is spectating .
121121 * </pre>
122122 *
123- * @param playerStatus byte[]. In Round: 0 - Dead, 1 - Alive;<br>
124- * In Lobby: 0 - Not Ready, 1 - Ready
123+ * @param playerStatus byte[]. In Round: 0 - Dead; 1 - Alive; -1 - Spectating ;<br>
124+ * In Lobby: 0 - Not Ready; 1 - Ready
125125 */
126126 public record playerStatusPacket (byte [] playerStatus ) implements CustomPayload {
127- public static final Id <playerStatusPacket > PACKET_ID = new Id <>(Identifier .of ("serverInfo " , "playerStatus_set " ));
127+ public static final Id <playerStatusPacket > PACKET_ID = new Id <>(Identifier .of ("serverinfo " , "playerstatus_set " ));
128128 public static final PacketCodec <RegistryByteBuf , playerStatusPacket > codec = PacketCodec .tuple (
129129 PacketCodecs .BYTE_ARRAY , playerStatusPacket ::playerStatus ,
130130 playerStatusPacket ::new
0 commit comments