Skip to content

Commit ce10f79

Browse files
committed
Resolved #2. (Added mention all players with @all in message.)
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 896a3e3 commit ce10f79

File tree

1 file changed

+13
-0
lines changed
  • src/main/kotlin/com/mairwunnx/projectessentials/chat

1 file changed

+13
-0
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/chat/EntryPoint.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,19 @@ class EntryPoint : EssBase() {
171171

172172
if (mentions.isNotEmpty()) {
173173
if (mentionSettings.mentionsEnabled && mentionSettings.mentionInActionBar) {
174+
if ("@all" in mentions) {
175+
event.player.server.playerList.players.forEach {
176+
it.sendStatusMessage(
177+
TextComponentUtils.toTextComponent {
178+
mentionSettings.mentionMessage.replace(
179+
"%player",
180+
event.player.name.string
181+
).replace("&", "§")
182+
}, true
183+
)
184+
}
185+
return
186+
}
174187
event.player.server.playerList.players.forEach {
175188
if ("@${it.name.string}" in mentions) {
176189
it.sendStatusMessage(

0 commit comments

Comments
 (0)