forked from virt-mirrors/Sit
make extra sure that packets can be sent to the server
This commit is contained in:
parent
884a3f639b
commit
b13f78d45c
1 changed files with 2 additions and 1 deletions
|
@ -369,7 +369,8 @@ public class Utl {
|
||||||
* sends the settings packets to the server, if client & in game
|
* sends the settings packets to the server, if client & in game
|
||||||
*/
|
*/
|
||||||
public static void sendSettingsPackets() {
|
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())));
|
ClientPlayNetworking.send(new SitPayloads.SettingsPayload(Utl.getGson().toJson(FileData.getSittingConfig())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue