diff options
| author | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-08-23 14:22:41 +0000 |
|---|---|---|
| committer | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-08-23 14:22:41 +0000 |
| commit | 2e87ea59da4e7a3a56f24641c22aeac50cc5b607 (patch) | |
| tree | 1bb7cc82a5833df6f4d9cea01116016bf62be5b9 /src/client/java | |
| parent | c6e309f02732eb79a24db6780c4f8f718fac2a29 (diff) | |
fix(networking): crash while joining server
Diffstat (limited to 'src/client/java')
| -rw-r--r-- | src/client/java/world/anhgelus/molehunt/client/MolehuntClient.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/java/world/anhgelus/molehunt/client/MolehuntClient.java b/src/client/java/world/anhgelus/molehunt/client/MolehuntClient.java index 7770a1b..1f92573 100644 --- a/src/client/java/world/anhgelus/molehunt/client/MolehuntClient.java +++ b/src/client/java/world/anhgelus/molehunt/client/MolehuntClient.java @@ -13,13 +13,11 @@ public class MolehuntClient implements ClientModInitializer { @Override public void onInitializeClient() { ClientPlayNetworking.registerGlobalReceiver(ConfigPayload.ID, (payload, context) -> { - try (final var client = context.client()) { - client.execute(() -> { - SHOW_SKINS = payload.showSkins(); - SHOW_NAMETAGS = payload.showNametags(); - SHOW_TAB = payload.showTab(); - }); - } + context.client().execute(() -> { + SHOW_SKINS = payload.showSkins(); + SHOW_NAMETAGS = payload.showNametags(); + SHOW_TAB = payload.showTab(); + }); }); } |
