Skip to content

Commit 5b6ebf7

Browse files
committed
split chat uploading and blocking
1 parent 991852d commit 5b6ebf7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client/java/com/coflnet/CoflModClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,7 @@ public void onInitializeClient() {
389389
});
390390

391391
ClientReceiveMessageEvents.ALLOW_GAME.register((message, overlay) -> {
392-
if(EventRegistry.onChatMessage(message.getString()))
393-
return false; // block the message if the core says it should be
392+
EventRegistry.onChatMessage(message.getString());
394393
// iterate over all components of the message
395394
String previousHover = null;
396395
for (Text component : message.getSiblings()) {
@@ -403,6 +402,8 @@ public void onInitializeClient() {
403402
EventRegistry.onChatMessage(hest.value().getString());
404403
}
405404
}
405+
if(EventRegistry.shouldBlockChatMessage(message.getString()))
406+
return false;
406407

407408
return true;
408409
});

0 commit comments

Comments
 (0)