Skip to content

Commit

Permalink
Merge pull request #3 from Elioby/main
Browse files Browse the repository at this point in the history
Actually send messages to other players
  • Loading branch information
heychazza committed Mar 8, 2022
2 parents 4e48d30 + 60fc443 commit 713381e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/sh/charlie/chitchat/listener/ChatListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.papermc.paper.event.player.AsyncChatEvent;
import me.clip.placeholderapi.PlaceholderAPI;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -77,7 +78,10 @@ public void onChat(AsyncChatEvent e) {
component = MessageHandler.replacePlaceholderApiPlaceholders(player, component);
}

MessageHandler.message(player, component);
for (Audience audience : e.viewers()) {
audience.sendMessage(component);
}

break;
}
}
Expand Down

0 comments on commit 713381e

Please sign in to comment.