Log custom messages sent in custom channels

Added a log statement to capture and log information whenever a message is sent in a custom channel. This includes the player's name, the channel name, and the message content for better monitoring and debugging.
This commit is contained in:
Teriuihi 2024-09-25 20:03:12 +02:00
parent 73e67eed6c
commit b3e545a0c8

View File

@ -41,6 +41,7 @@ public class ToggleableForCustomChannel extends Toggleable {
new BukkitRunnable() {
@Override
public void run() {
ALogger.info(String.format("%s sent %s message: %s", player.getName(), customChannel.getChannelName(), message));
ChatPlugin.getInstance().getChatHandler().chatChannel(player, customChannel, message);
}
}.runTaskAsynchronously(ChatPlugin.getInstance());