Do not process messages

This commit is contained in:
Mariell Hoversholm committed 2020-09-05 11:43:41 +02:00
1 parent ab102be69d
commit 331383881a
2 files changed
+4 -15

No files matched your search

@@ -137,12 +137,7 @@ public class CarbonChatChannel extends ChatChannel {
targetColor.asHexString()).append(formatComponent); targetColor.asHexString()).append(formatComponent);
} }
TextComponent messageComponent = (TextComponent) carbonChat.getAdventureManager().processMessage(formatEvent.getMessage(), TextComponent messageComponent = TextComponent.of(formatEvent.getMessage());
"br", "\n",
"displayname", displayName,
"color", "<" + targetColor.asHexString() + ">",
"phase", Long.toString(System.currentTimeMillis() % 25),
"server", carbonChat.getConfig().getString("server-name", "Server"));
TextComponent processedComponent = (TextComponent)formatComponent.replaceFirstText(MESSAGE_PATTERN, (input) -> { TextComponent processedComponent = (TextComponent)formatComponent.replaceFirstText(MESSAGE_PATTERN, (input) -> {
return messageComponent.toBuilder(); return messageComponent.toBuilder();
@@ -164,20 +159,14 @@ public class CarbonChatChannel extends ChatChannel {
TextColor targetColor = getChannelColor(user); TextColor targetColor = getChannelColor(user);
TextComponent consoleFormat = (TextComponent) carbonChat.getAdventureManager().processMessage(consoleFormatEvent.getFormat(), TextComponent consoleFormat = (TextComponent) carbonChat.getAdventureManager().processMessage(consoleFormatEvent.getFormat(),
"br", "\n",
"displayname", displayName,
"color", "<" + targetColor.asHexString() + ">",
"phase", Long.toString(System.currentTimeMillis() % 25),
"server", carbonChat.getConfig().getString("server-name", "Server"),
"message", consoleFormatEvent.getMessage());
TextComponent consoleMessage = (TextComponent) carbonChat.getAdventureManager().processMessage(consoleFormatEvent.getMessage(),
"br", "\n", "br", "\n",
"displayname", displayName, "displayname", displayName,
"color", "<" + targetColor.asHexString() + ">", "color", "<" + targetColor.asHexString() + ">",
"phase", Long.toString(System.currentTimeMillis() % 25), "phase", Long.toString(System.currentTimeMillis() % 25),
"server", carbonChat.getConfig().getString("server-name", "Server")); "server", carbonChat.getConfig().getString("server-name", "Server"));
TextComponent consoleMessage = TextComponent.of(consoleFormatEvent.getMessage());
TextComponent consoleComponent = (TextComponent)consoleFormat.replaceFirstText(MESSAGE_PATTERN, (input) -> { TextComponent consoleComponent = (TextComponent)consoleFormat.replaceFirstText(MESSAGE_PATTERN, (input) -> {
return consoleMessage.toBuilder(); return consoleMessage.toBuilder();
}); });
+1 -1
View File
@@ -4,7 +4,7 @@
# 'MineDown': https://github.com/Phoenix616/MineDown#syntax # 'MineDown': https://github.com/Phoenix616/MineDown#syntax
# 'JSON': https://minecraft.gamepedia.com/Raw_JSON_text_format # 'JSON': https://minecraft.gamepedia.com/Raw_JSON_text_format
# Note that the messages provided in the default config utilise MiniMessage, and need to be changed if you're using MineDown # Note that the messages provided in the default config utilise MiniMessage, and need to be changed if you're using MineDown
# Please DO NOT use JSON formatting unless you really know what you're doing # Please DO NOT use JSON formatting unless you really know what you're doing.
formatting: formatting:
type: 'MiniMessage' type: 'MiniMessage'