diff --git a/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/ChatListener.kt b/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/ChatListener.kt index d3373b7..b2e0563 100644 --- a/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/ChatListener.kt +++ b/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/ChatListener.kt @@ -62,7 +62,7 @@ class ChatListener : Listener { val channelData = ogChannelData.withChannelVerified() val channelId = channelData.channelId val channel = channelData.channel ?: return - val baseMessage = message().children().last() + val baseMessage = message().children().lastOrNull() ?: message() if (viewers().isNotEmpty()) viewers().clear() viewers() += channel.getAudience(player)