1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-19 10:22:58 +01:00

Players & Console can now use color codes in party or admin chat (new permission node mcmmo.chat.colors)

This commit is contained in:
nossr50
2020-10-27 11:55:59 -07:00
parent 1d55c4c2bc
commit d183d1217c
8 changed files with 49 additions and 15 deletions

View File

@@ -60,10 +60,10 @@ public class ChatManager {
private void processPlayerMessage(@NotNull McMMOPlayer mmoPlayer, @NotNull ChatChannel chatChannel, @NotNull String rawMessage, boolean isAsync) {
switch (chatChannel) {
case ADMIN:
adminChatMailer.processChatMessage(mmoPlayer.getAdminAuthor(), rawMessage, isAsync);
adminChatMailer.processChatMessage(mmoPlayer.getAdminAuthor(), rawMessage, isAsync, Permissions.colorChat(mmoPlayer.getPlayer()));
break;
case PARTY:
partyChatMailer.processChatMessage(mmoPlayer.getPartyAuthor(), rawMessage, mmoPlayer.getParty(), isAsync);
partyChatMailer.processChatMessage(mmoPlayer.getPartyAuthor(), rawMessage, mmoPlayer.getParty(), isAsync, Permissions.colorChat(mmoPlayer.getPlayer()));
break;
case PARTY_OFFICER:
case NONE:
@@ -76,7 +76,7 @@ public class ChatManager {
* @param rawMessage raw message from the console
*/
public void processConsoleMessage(@NotNull String rawMessage) {
adminChatMailer.processChatMessage(getConsoleAuthor(), rawMessage, false);
adminChatMailer.processChatMessage(getConsoleAuthor(), rawMessage, false, true);
}
/**
@@ -93,7 +93,7 @@ public class ChatManager {
* @param party target party
*/
public void processConsoleMessage(@NotNull String rawMessage, @NotNull Party party) {
partyChatMailer.processChatMessage(getConsoleAuthor(), rawMessage, party, false);
partyChatMailer.processChatMessage(getConsoleAuthor(), rawMessage, party, false, true);
}
/**