Skip to content

Commit

Permalink
Disable all messages if no players are online
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercerenies committed Jun 3, 2024
1 parent 67d63c0 commit b1dbc33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Messages.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object Messages {
fun broadcastMessage(message: Component) {
Bukkit.getServer().broadcast(prefix.append(message))

if (shouldMirrorToDiscord) {
if (shouldMirrorToDiscord && (Bukkit.getOnlinePlayers().size > 0)) {
// Send to DiscordSRV, if available.
DiscordSRVBridge.broadcastMessageIfAvailable(discordPrefix + message.asPlainText())
// TODO Consider writing a serializer that takes Component to
Expand Down

0 comments on commit b1dbc33

Please sign in to comment.