File tree Expand file tree Collapse file tree 3 files changed +21
-11
lines changed
kotlin/com/mairwunnx/projectessentials/chat
resources/assets/projectessentialschat/lang Expand file tree Collapse file tree 3 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -172,17 +172,25 @@ class EntryPoint : EssBase() {
172172 if (mentions.isNotEmpty()) {
173173 if (mentionSettings.mentionsEnabled && mentionSettings.mentionInActionBar) {
174174 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
175+ if (hasPermission(event.player, " ess.chat.mention.all" , 2 )) {
176+ event.player.server.playerList.players.forEach {
177+ it.sendStatusMessage(
178+ TextComponentUtils .toTextComponent {
179+ mentionSettings.mentionMessage.replace(
180+ " %player" ,
181+ event.player.name.string
182+ ).replace(" &" , " §" )
183+ }, true
184+ )
185+ }
186+ return
187+ } else {
188+ sendMsg(
189+ " chat" ,
190+ event.player.commandSource,
191+ " chat.mention_all_aborted"
183192 )
184193 }
185- return
186194 }
187195 event.player.server.playerList.players.forEach {
188196 if (" @${it.name.string} " in mentions) {
Original file line number Diff line number Diff line change 44 "project_essentials_chat.chat.color_restricted" : " §cYou §7don't have permission §cto use chat colors." ,
55 "project_essentials_chat.chat.blocked_word" : " §cMessage not sent, your message contains blocked word: \" §7%s\" ." ,
66 "project_essentials_chat.chat.blocked_char" : " §cMessage not sent, your message contains blocked symbol." ,
7- "project_essentials_chat.chat.message_maxlength" : " §cMessage not sent, your message length exceeds maximum allowed length."
7+ "project_essentials_chat.chat.message_maxlength" : " §cMessage not sent, your message length exceeds maximum allowed length." ,
8+ "project_essentials_chat.chat.mention_all_aborted" : " §cMention not sent to all players, you §7don't have permission§c to mention all players."
89}
Original file line number Diff line number Diff line change 44 "project_essentials_chat.chat.color_restricted" : " §cУ вас §7нет прав §cна использование цветов в чате." ,
55 "project_essentials_chat.chat.blocked_word" : " §cСообщение не отправлено, ваше сообщение содержит заблокированное слово: \" §7%s\" ." ,
66 "project_essentials_chat.chat.blocked_char" : " §cСообщение не отправлено, ваше сообщение содержит заблокированный символ." ,
7- "project_essentials_chat.chat.message_maxlength" : " §cСообщение не отправлено, ваше сообщение превышает максимально допустимую длину."
7+ "project_essentials_chat.chat.message_maxlength" : " §cСообщение не отправлено, ваше сообщение превышает максимально допустимую длину." ,
8+ "project_essentials_chat.chat.mention_all_aborted" : " §cОповещение не было отправлено всем игрокам, у вас §7нет прав§c на оповещение всех игроков."
89}
You can’t perform that action at this time.
0 commit comments