Skip to content

Commit

Permalink
Fix sync api event calling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Brikster committed Jan 17, 2022
1 parent 81e3d5c commit 39e663d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allprojects {
group = 'ru.mrbrikster'
version = '2.19.5'
version = '2.19.6'
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ private void onChat(AsyncPlayerChatEvent event) {

pendingSpyMessages.put(player, Pair.of(chat, new ArrayList<>(event.getRecipients())));

ChattyMessageEvent chattyMessageEvent = new ChattyMessageEvent(player, chat, message);
Bukkit.getPluginManager().callEvent(chattyMessageEvent);
Bukkit.getScheduler().runTaskAsynchronously(Chatty.instance(), () -> {
ChattyMessageEvent chattyMessageEvent = new ChattyMessageEvent(player, chat, event.getMessage());
Bukkit.getPluginManager().callEvent(chattyMessageEvent);
});
}

private boolean hasActiveCooldown(AsyncPlayerChatEvent event, Player player, Chat chat) {
Expand Down

0 comments on commit 39e663d

Please sign in to comment.