Bifrost: Don't announce uninteresting advancements.

This commit is contained in:
Kenneth Endfinger
2022-01-17 17:36:58 -05:00
parent 9395f43e40
commit 011e3100bf

View File

@ -171,6 +171,11 @@ class FoundationBifrostPlugin : JavaPlugin(), DiscordEventListener, BukkitEventL
return
}
val advancementDisplay = e.advancement.display ?: return
if (!advancementDisplay.doesAnnounceToChat()) {
return
}
val display = AdvancementTitleCache.of(e.advancement) ?: return
sendEmbedMessage(Color.CYAN, "${e.player.name} completed the advancement '${display}'")
}