From 0f8505d54ff180df6005e3b790a0b606289d0fc9 Mon Sep 17 00:00:00 2001 From: Angelillo15 Date: Thu, 7 Sep 2023 16:47:24 +0200 Subject: [PATCH] Message null check --- .../main/java/es/angelillo15/antiabusers/AntiAbuserPlayer.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AntiAbusers-API/src/main/java/es/angelillo15/antiabusers/AntiAbuserPlayer.kt b/AntiAbusers-API/src/main/java/es/angelillo15/antiabusers/AntiAbuserPlayer.kt index c682cc3..9bdf43e 100644 --- a/AntiAbusers-API/src/main/java/es/angelillo15/antiabusers/AntiAbuserPlayer.kt +++ b/AntiAbusers-API/src/main/java/es/angelillo15/antiabusers/AntiAbuserPlayer.kt @@ -70,6 +70,7 @@ interface AntiAbuserPlayer { * @param message the message to send */ fun sendMessage(message: String) { + if (message.isEmpty()) return sendMessage(MiniMessage.miniMessage().deserialize(TextUtils.toMM(message))) } @@ -78,6 +79,7 @@ interface AntiAbuserPlayer { * @param message the message to send */ fun sendActionBar(message: String) { + if (message.isEmpty()) return sendActionBar(MiniMessage.miniMessage().deserialize(TextUtils.toMM(message))) }