mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +00:00
Change user name placeholders in channels
This commit is contained in:
1 parent
d98cd88d56
commit
aac52d6a29
1 file changed
+7
-5
+7
-5
@@ -125,8 +125,6 @@ public class CarbonChatChannel implements TextChannel {
|
|||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
final String displayName = user.nickname();
|
|
||||||
|
|
||||||
final Map<CarbonUser, Component> users = new HashMap<>();
|
final Map<CarbonUser, Component> users = new HashMap<>();
|
||||||
|
|
||||||
// Iterate through players who should receive messages in this channel
|
// Iterate through players who should receive messages in this channel
|
||||||
@@ -148,7 +146,7 @@ public class CarbonChatChannel implements TextChannel {
|
|||||||
TextColor colorBuffer = null;
|
TextColor colorBuffer = null;
|
||||||
|
|
||||||
for (final ColorPriority colorPriority : this.options().colorPriorities()) {
|
for (final ColorPriority colorPriority : this.options().colorPriorities()) {
|
||||||
if (colorPriority == ColorPriority.CHANNEL && channelColor != null) {
|
if (colorPriority == ColorPriority.CHANNEL) {
|
||||||
colorBuffer = channelColor;
|
colorBuffer = channelColor;
|
||||||
} else if (colorPriority == ColorPriority.PLAYER && userColor != null) {
|
} else if (colorPriority == ColorPriority.PLAYER && userColor != null) {
|
||||||
colorBuffer = userColor;
|
colorBuffer = userColor;
|
||||||
@@ -166,7 +164,9 @@ public class CarbonChatChannel implements TextChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextComponent formatComponent = (TextComponent) this.carbonChat.messageProcessor().processMessage(formatEvent.format(),
|
TextComponent formatComponent = (TextComponent) this.carbonChat.messageProcessor().processMessage(formatEvent.format(),
|
||||||
"displayname", displayName,
|
"nickname", user.nickname(),
|
||||||
|
"displayname", user.displayName(),
|
||||||
|
"username", user.name(),
|
||||||
"color", "<" + chosenColor.asHexString() + ">",
|
"color", "<" + chosenColor.asHexString() + ">",
|
||||||
"playercolor", "<" + user.customChatColor(),
|
"playercolor", "<" + user.customChatColor(),
|
||||||
"phase", Long.toString(System.currentTimeMillis() % 25),
|
"phase", Long.toString(System.currentTimeMillis() % 25),
|
||||||
@@ -201,7 +201,9 @@ public class CarbonChatChannel implements TextChannel {
|
|||||||
final TextColor channelColor = this.channelColor(user);
|
final TextColor channelColor = this.channelColor(user);
|
||||||
|
|
||||||
final TextComponent consoleFormat = (TextComponent) this.carbonChat.messageProcessor().processMessage(consoleFormatEvent.format(),
|
final TextComponent consoleFormat = (TextComponent) this.carbonChat.messageProcessor().processMessage(consoleFormatEvent.format(),
|
||||||
"displayname", displayName,
|
"nickname", user.nickname(),
|
||||||
|
"displayname", user.displayName(),
|
||||||
|
"username", user.name(),
|
||||||
"color", "<" + channelColor.asHexString() + ">",
|
"color", "<" + channelColor.asHexString() + ">",
|
||||||
"playercolor", "<" + user.customChatColor(),
|
"playercolor", "<" + user.customChatColor(),
|
||||||
"phase", Long.toString(System.currentTimeMillis() % 25),
|
"phase", Long.toString(System.currentTimeMillis() % 25),
|
||||||
|
|||||||
Reference in new issue
Block a user