make extra sure that packets can be sent to the server

This commit is contained in:
Oth3r 2025-04-19 19:38:55 -05:00
commit 3a51c2add2

View file

@ -369,7 +369,8 @@ public class Utl {
* sends the settings packets to the server, if client & in game
*/
public static void sendSettingsPackets() {
if (Data.isClient() && Data.isInGame()) {
if (Data.isClient() && Data.isInGame() &&
ClientPlayNetworking.canSend(SitPayloads.SettingsPayload.ID)) {
ClientPlayNetworking.send(new SitPayloads.SettingsPayload(Utl.getGson().toJson(FileData.getSittingConfig())));
}
}