Skip to content

Commit

Permalink
fix: pass event cancelled status to fairy event
Browse files Browse the repository at this point in the history
  • Loading branch information
rexlManu committed Jun 2, 2024
1 parent fb6fd28 commit 4ee40de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public void handle(AsyncChatEvent event) {
event.renderer()::render,
event.message());

chatEvent.setCancelled(event.isCancelled());

chatEvent.callEvent();

event.setCancelled(chatEvent.isCancelled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public void handle(AsyncPlayerChatEvent event) {
return LegacyComponentSerializer.legacySection().deserialize(formattedMessage);
},
LegacyComponentSerializer.legacySection().deserialize(event.getMessage()));
chatEvent.setCancelled(event.isCancelled());

this.server.getPluginManager().callEvent(chatEvent);

Expand Down

0 comments on commit 4ee40de

Please sign in to comment.