chat notifier: restore original color when highlighting own name
This commit is contained in:
@@ -262,11 +262,11 @@ public class ChatNotificationsPluginTest
|
||||
when(config.highlightOwnName()).thenReturn(true);
|
||||
|
||||
MessageNode messageNode = mock(MessageNode.class);
|
||||
when(messageNode.getValue()).thenReturn("<col=005f00>Logic Knot received a drop: Adamant longsword</col>");
|
||||
when(messageNode.getValue()).thenReturn("Logic Knot received a drop: Adamant longsword");
|
||||
ChatMessage chatMessage = new ChatMessage(messageNode, ChatMessageType.GAMEMESSAGE, "", "", "", 0);
|
||||
chatNotificationsPlugin.onChatMessage(chatMessage);
|
||||
|
||||
verify(messageNode).setValue("<col=005f00><colHIGHLIGHT><u>Logic Knot</u><colNORMAL> received a drop: Adamant longsword</col>");
|
||||
verify(messageNode).setValue("<colHIGHLIGHT><u>Logic Knot</u></col> received a drop: Adamant longsword");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -284,6 +284,6 @@ public class ChatNotificationsPluginTest
|
||||
chatNotificationsPlugin.onChatMessage(chatMessage);
|
||||
|
||||
// set value uses our player name, which has nbsp replaced
|
||||
verify(messageNode).setValue("<col=005f00><colHIGHLIGHT><u>Logic Knot</u><colNORMAL> received a drop: Adamant longsword</col>");
|
||||
verify(messageNode).setValue("<col=005f00><colHIGHLIGHT><u>Logic Knot</u><col=005f00> received a drop: Adamant longsword</col>");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user