Skip to content

Commit

Permalink
Disable Message Dialogue from resending chat
Browse files Browse the repository at this point in the history
  • Loading branch information
gabber235 committed Dec 11, 2024
1 parent f7522b0 commit fd4f8aa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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) {
Expand Down

0 comments on commit fd4f8aa

Please sign in to comment.