Skip to content

Commit

Permalink
Fix local notification feature
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlgo committed Jun 21, 2023
1 parent a7b0aaa commit a3117e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ internal class SpigotV1m16p5MCNCListener(private val plugin: ChatPlugin) : Liste
if (event.isGlobal) return

plugin.server.scheduler.scheduleSyncDelayedTask(plugin) {
if (event.recipients.any { it.gameMode != GameMode.SPECTATOR }) return@scheduleSyncDelayedTask
event.sender.sendMessage(plugin.config.localNotification)
if (event.recipients.any { it.gameMode != GameMode.SPECTATOR && it != event.sender }) return@scheduleSyncDelayedTask
event.sender.sendMessage(plugin.formatter.formatPlain(event.sender, plugin.config.localNotification))
}
}

Expand Down

0 comments on commit a3117e9

Please # to comment.