From fd4f8aa44d3d51b5a9687ab3d78c6bd14e70c761 Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Wed, 11 Dec 2024 19:40:47 +0100 Subject: [PATCH] Disable Message Dialogue from resending chat --- .../message/UniversalMessageDialogueDialogueMessenger.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/dialogue/messengers/message/UniversalMessageDialogueDialogueMessenger.kt b/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/dialogue/messengers/message/UniversalMessageDialogueDialogueMessenger.kt index 041e055305..829a02ce7c 100644 --- a/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/dialogue/messengers/message/UniversalMessageDialogueDialogueMessenger.kt +++ b/extensions/BasicExtension/src/main/kotlin/com/typewritermc/basic/entries/dialogue/messengers/message/UniversalMessageDialogueDialogueMessenger.kt @@ -12,7 +12,6 @@ import com.typewritermc.engine.paper.snippets.snippet import com.typewritermc.engine.paper.utils.sendMiniWithResolvers import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder import org.bukkit.entity.Player -import java.time.Duration val messageFormat: String by snippet( "dialogue.message.format", @@ -38,6 +37,10 @@ class UniversalMessageDialogueDialogueMessenger(player: Player, entry: MessageDi state = MessengerState.FINISHED player.sendMessageDialogue(entry.text.get(player), entry.speakerDisplayName.get(player)) } + + override fun end() { + // Do nothing as we don't need to resend the messages. + } } fun Player.sendMessageDialogue(text: String, speakerDisplayName: String) {