Skip to content

Commit

Permalink
Broadcast votes
Browse files Browse the repository at this point in the history
  • Loading branch information
andyksaw committed Nov 28, 2024
1 parent d48f769 commit 33a8dce
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ class BuildVoteCommand(

val build = buildRepository.vote(name = name, player = player)

val miniMessage = MiniMessage.miniMessage()
context.source.sender.sendMessage(
MiniMessage.miniMessage().deserialize("<green>You voted for ${build.name}</green>")
miniMessage.deserialize("<green>You voted for ${build.name}</green>")
)
plugin.server.broadcast(
miniMessage.deserialize("<gray>${player.name} voted for build \"<white>${build.name}</white>\"</gray>")
)
}
}

0 comments on commit 33a8dce

Please sign in to comment.