Skip to content

Commit a292755

Browse files
authored
Prevent Exceptions in ChatUtils#sendMsg (#5903)
1 parent 326650d commit a292755

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/main/java/meteordevelopment/meteorclient/utils/player

src/main/java/meteordevelopment/meteorclient/utils/player/ChatUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ public static void sendMsg(int id, @Nullable String prefixTitle, @Nullable Forma
160160

161161
if (!Config.get().deleteChatFeedback.get()) id = 0;
162162

163-
((IChatHud) mc.inGameHud.getChatHud()).meteor$add(message, id);
163+
final int finalId = id; // Intellij copes about using non-final args in lambdas
164+
mc.execute(() -> ((IChatHud) mc.inGameHud.getChatHud()).meteor$add(message, finalId));
164165
}
165166

166167
private static MutableText getCustomPrefix(String prefixTitle, Formatting prefixColor) {

0 commit comments

Comments
 (0)