Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Drop empty chat messages. Closes #428
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Jul 20, 2022
1 parent a572cfc commit a12df83
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ public static List<Object> handle(
return new ArrayList<>(0);
}

// 1.18.2 servers can send null chat messages, which don't do anything
// 1.19 can't handle these anymore, so just drop them
if ("null".equals(text_.getJson())) {
return new ArrayList<>(0);
}

CommonTypes.Text text = textTranslator.apply((Text_1_18_2) text_);

Registry<ChatType> chatTypeRegistry = registryAccess.registryOrThrow(Registry.CHAT_TYPE_REGISTRY);
Expand Down

0 comments on commit a12df83

Please sign in to comment.